public class Bomb
extends java.lang.Object
Constructor and Description |
---|
Bomb(int x,
int y,
Mouse mouse)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
detonate()
Mark the bomb has detonated if it has not been detonated already.
|
Mouse |
getMouse()
Get the Mouse that planted the bomb.
|
int |
getX()
Get the X-axis of the location of the bomb.
|
int |
getY()
Get the Y-axis of the location of the bomb.
|
boolean |
hasDetonated()
Determine if the bomb has been detonated when a mouse comes across it.
|
public Bomb(int x, int y, Mouse mouse)
x
- The X axis of the location of the bomb.y
- The Y axis of the location of the bomb.mouse
- The mouse that planted the bomb.public int getX()
public int getY()
public Mouse getMouse()
public boolean hasDetonated()
public void detonate()