|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.gridworld.actor.Actor
info.gridworld.actor.Rock
public class Rock
A Rock is an actor that does nothing. It is commonly used to
block other actors from moving.
The API of this class is testable on the AP CS A and AB exams.
| Constructor Summary | |
|---|---|
Rock()
Constructs a black rock. |
|
Rock(java.awt.Color rockColor)
Constructs a rock of a given color. |
|
| Method Summary | |
|---|---|
void |
act()
Overrides the act method in the Actor class
to do nothing. |
| Methods inherited from class info.gridworld.actor.Actor |
|---|
getColor, getDirection, getGrid, getLocation, moveTo, putSelfInGrid, removeSelfFromGrid, setColor, setDirection, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rock()
public Rock(java.awt.Color rockColor)
rockColor - the color of this rock| Method Detail |
|---|
public void act()
act method in the Actor class
to do nothing.
act in class Actor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||