Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.caff.maze
Class MazeCell

    java.lang.Object
      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:

- The flooding algorithm used to create the maze associates every cell with a set, so there has to be a way to set and get this set: see `MazeCell.getSet()` and `MazeCell.setSet(Object)`.
- A cell has neighbours and can be connected to them: see `MazeCell.getNeighbours()`, `MazeCell.connectTo(MazeCell)` and `MazeCell.getConnectedNeighbours()`.
- A cell belongs to a maze: see `MazeCell.getMaze()`
- In this maze it has an unique id: `MazeCell.getID()`
- A cell has a shape: see `MazeCell.getShape()`

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)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD