|
Amazing Mazes | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
java.lang.Object
|
+--Mouse
|
+--Smarty
The Smarty mouse is a base class with a brain. It improves the advance() and retreat() method by leaving a trail of bread in the form of an invisible wall.
| Fields inherited from class Mouse |
curPosition_,
mazeAdapter_,
stack_ |
| Constructor Summary | |
Smarty()
|
|
| Method Summary | |
protected void |
advance(Direction direction)
This advance() method does everything the base class advance() does, but adds a memory by closing the wall behind it (sort of like leaving a trail of bread). |
protected void |
retreat()
This retreat() method does everything the base class retreat() does, but adds a memory by closing the wall behind it (sort of like leaving a trail of bread). |
| Methods inherited from class Mouse |
distanceToGoal,
makeAMove,
passagewayOpenAt,
randomInt,
solveMaze |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Smarty()
| Method Detail |
protected void advance(Direction direction)
throws InvalidMove
direction - the direction to advance.
protected void retreat()
throws NoSolutionFound
|
Author: Andrew Bridges Copyright © 2001 |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||