de.caff.maze
Class MazeCell

java.lang.Object
  extended by de.caff.maze.MazeCell

public abstract class MazeCell
extends java.lang.Object

Basic class describing a cell in a maze. The following items describe the intention used:

 

Constructor Summary
MazeCell()
           
 
Method Summary
abstract  void connectTo(MazeCell cell)
          Connect this cell to the given one.
abstract  MazeCell[] getConnectedNeighbours()
          Get the connected neighbour cells of this one.
abstract  int getID()
          Get the id of this cell.
abstract  Maze getMaze()
          Get the maze to which this cell belongs.
abstract  MazeCell[] getNeighbours()
          Get the neighbour cells of this one.
 java.lang.Object getSet()
          Get the current set during maze creation.
abstract  java.awt.Shape getShape()
          Get the shape of this cell in the current display.
 void setSet(java.lang.Object set)
          Set the current set during maze creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MazeCell

public MazeCell()
Method Detail

getSet

public java.lang.Object getSet()
Get the current set during maze creation.

Returns:
current set

setSet

public void setSet(java.lang.Object set)
Set the current set during maze creation.

Parameters:
set - the current set

connectTo

public abstract void connectTo(MazeCell cell)
Connect this cell to the given one. The algorithm will also call the inverse method for cell.

Parameters:
cell - cell to connect to

getNeighbours

public abstract MazeCell[] getNeighbours()
Get the neighbour cells of this one.

Returns:
neigbour cells

getConnectedNeighbours

public abstract MazeCell[] getConnectedNeighbours()
Get the connected neighbour cells of this one.

Returns:
neigbour cells

getMaze

public abstract Maze getMaze()
Get the maze to which this cell belongs.

Returns:
the maze of this cell

getShape

public abstract java.awt.Shape getShape()
Get the shape of this cell in the current display.

Returns:
maze cell shape

getID

public abstract int getID()
Get the id of this cell. The id has to be unique for a given geometry of a maze.

Returns:
unique id
See Also:
Maze.getCellByID(int)