|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.univ.paris5.GameOfLife.Cell
public class Cell
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 |
---|
public final short col
public final short row
public State state
Constructor Detail |
---|
public Cell(int col, int row)
col
- row
- public Cell(int col, int row, State state)
col
- column of cellrow
- row or cellMethod Detail |
---|
public void setState(State state)
state
- the state to setpublic State getState()
public java.lang.String getPosition()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |