|
||||||||||
| 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.Bug
gridWorldTest.BoxBug
public class BoxBug
A BoxBug traces out a square "box" of a given size.
The implementation of this class is testable on the AP CS A and AB exams.
| Constructor Summary | |
|---|---|
BoxBug(int length)
Constructs a box bug that traces a square of a given side length |
|
| Method Summary | |
|---|---|
void |
act()
Moves to the next location of the square. |
| Methods inherited from class info.gridworld.actor.Bug |
|---|
canMove, move, turn |
| 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 BoxBug(int length)
length - the side length| Method Detail |
|---|
public void act()
act in class Bug
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||