|
Amazing Mazes | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The MazeAdapter interface provides a neutral and abstract mechnism to access various maze objects ... a gateway so-to-speak. A Mouse object which traverses it's maze via the MazeAdapter interface is insulated from the physical maze object, thereby allowing the same Mouse to traverse any number of mazes :-)
Method Summary | |
void |
erectWall(java.awt.Point cellLocation,
Direction direction)
This method will erect a wall in self's maze, at the supplied cellLocation, facing the supplied direction. |
java.awt.Point |
getEndingCoord()
This method will return the ending coordinate of self's maze (i.e. |
java.awt.Point |
getStartingCoord()
This method will return the starting coordinate of self's maze (i.e. |
boolean |
passagewayOpenAt(java.awt.Point cellLocation,
Direction direction)
This method will return a true/false indicator as to whether the passageway (within self's maze) at the supplied cellLocation/direction is open or not. |
void |
visualizeAdvance(java.awt.Point cellLocation,
Direction direction)
This method will visualize an advancement move within self's maze at the supplied cellLocation and direction. |
void |
visualizeRetreat(java.awt.Point cellLocation,
Direction direction)
This method will visualize a retreat move within self's maze at the supplied cellLocation and direction. |
Method Detail |
public java.awt.Point getStartingCoord()
public java.awt.Point getEndingCoord()
public boolean passagewayOpenAt(java.awt.Point cellLocation, Direction direction)
cellLocation
- the maze cell coordinate that is to be checked.direction
- the direction within the cellLocation that is to be checked.public void visualizeAdvance(java.awt.Point cellLocation, Direction direction)
cellLocation
- the maze cell coordinate that is the start of
the advancment.direction
- the direction within the cellLocation that we
are to move.public void visualizeRetreat(java.awt.Point cellLocation, Direction direction)
cellLocation
- the maze cell coordinate that is the start of
the retreat.direction
- the direction within the cellLocation that we
are to move.public void erectWall(java.awt.Point cellLocation, Direction direction)
The context in which this is used is to NOT visualize a physical wall within the maze, but rather to close the wall that has been traversed ... in order to prevent advancment back where we came from.
cellLocation
- the maze cell coordinate where the wall is to
be erected.direction
- the direction within the cellLocation where the
wall is to be erected.
|
Author: Andrew Bridges Copyright © 2001 |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |