|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
maze.structure.MazeCell
A single Cell within the Maze.
| Field Summary | |
static int |
BLACK
This cell is Black. |
static int |
BLANK
This cell has not had a color assigned. |
static int |
RED
This cell is Red. |
boolean |
special
Is this a specially-colored cell? |
protected int |
theColor
The color of this cell, either BLANK, RED or BLACK. |
Coordinate |
theLocation
The Coordinate location of this Cell. |
| Constructor Summary | |
MazeCell()
|
|
| Method Summary | |
abstract void |
drawFloor(java.awt.Graphics g)
Draws the floor color of this cell. |
abstract void |
drawWall(java.awt.Graphics g)
Draw the bounding walls of this Cell. |
int |
getColor()
Gets the Color for this cell. |
void |
setColor(int c)
Sets the color for this cell. |
void |
setCoord(Coordinate c)
Set the Coordinate for this Cell |
void |
setGeoCoord(MazeGeometry g,
Coordinate c)
Set the Geometry and the Coordinate. |
void |
setGeometry(MazeGeometry g)
Sets the MazeGeometry of this Cell. |
void |
special()
Defines this cell as "special". |
abstract java.lang.String |
toString()
Returns the String representation for this cell. |
abstract boolean |
used()
Returns true if this cell is used. |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public Coordinate theLocation
public boolean special
public static final int BLANK
public static final int RED
public static final int BLACK
protected int theColor
| Constructor Detail |
public MazeCell()
| Method Detail |
public abstract void drawFloor(java.awt.Graphics g)
g - Graphics context.public abstract void drawWall(java.awt.Graphics g)
g - Graphics context.public void setGeometry(MazeGeometry g)
g - A RectGeometry.public void setCoord(Coordinate c)
c - Coordinate for this cell.
public void setGeoCoord(MazeGeometry g,
Coordinate c)
g - MazeGeometry for this cell.c - Coordinate for this cell.public void special()
public abstract boolean used()
public int getColor()
public void setColor(int c)
c - int color code, one of BLANK, RED or BLACK.public abstract java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||