org.univ.paris5.GameOfLife
Class Cell

java.lang.Object
  extended by org.univ.paris5.GameOfLife.Cell

public class Cell
extends java.lang.Object

Every cell in the grid is a Cell-object. So it must be as small as possible. Because every cell is pre-generated, no cells have to be generated when the Game Of Life playw. Whether a cell is alive or not, is not part of the Cell-object.


Field Summary
 short col
           
 short row
           
 State state
           
 
Constructor Summary
Cell(int col, int row)
          Instance of the Cell.
Cell(int col, int row, State state)
          Constructor
 
Method Summary
 java.lang.String getPosition()
          Get String Position.
 State getState()
          Get State Objet.
 void setState(State state)
          Set State Objet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

col

public final short col

row

public final short row

state

public State state
Constructor Detail

Cell

public Cell(int col,
            int row)
Instance of the Cell.

Parameters:
col -
row -

Cell

public Cell(int col,
            int row,
            State state)
Constructor

Parameters:
col - column of cell
row - row or cell
Method Detail

setState

public void setState(State state)
Set State Objet.

Parameters:
state - the state to set

getState

public State getState()
Get State Objet.

Returns:
the state

getPosition

public java.lang.String getPosition()
Get String Position. Like: '12/1'

Returns: