org.drools.examples.conway
Class Cell
java.lang.Object
org.drools.examples.conway.Cell
public class Cell
- extends Object
A Cell represents a single cell within a CellGrid.
A cell may be either live or dead.
- See Also:
CellState,
CellGridImpl
|
Constructor Summary |
Cell(int col,
int row)
|
Cell
public Cell(int col,
int row)
getCol
public int getCol()
getRow
public int getRow()
getPhase
public int getPhase()
setPhase
public void setPhase(int phase)
getLiveNeighbors
public int getLiveNeighbors()
setLiveNeighbors
public void setLiveNeighbors(int liveNeighbors)
getCellState
public CellState getCellState()
- Returns:
- this cell's current life state
- See Also:
#queueNextCellState(org.drools.examples.conway.CellState),
CellState
setCellState
public void setCellState(CellState newState)
- Sets this cells state
- Parameters:
newState - new state for this cell- See Also:
CellState
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.