public class Rock extends Actor
Rock is an actor that does nothing. It is commonly used to
block other actors from moving. | Constructor and Description |
|---|
Rock()
Constructs a black rock.
|
Rock(Color rockColor)
Constructs a rock of a given color.
|
| Modifier and Type | Method and Description |
|---|---|
void |
act()
Overrides the
act method in the Actor class
to do nothing. |
getColor, getDirection, getGrid, getLocation, moveTo, putSelfInGrid, removeSelfFromGrid, setColor, setDirection, toStringpublic Rock()
public Rock(Color rockColor)
rockColor - the color of this rock