public class Cell extends Object
Cell
represents a single cell within a CellGrid
.
A cell may be either live or dead. CellState
,
CellGridImpl
Constructor and Description |
---|
Cell(int col,
int row) |
Modifier and Type | Method and Description |
---|---|
CellState |
getCellState() |
int |
getCol() |
int |
getLiveNeighbors() |
int |
getPhase() |
int |
getRow() |
void |
setCellState(CellState newState)
Sets this cells state
|
void |
setLiveNeighbors(int liveNeighbors) |
void |
setPhase(int phase) |
String |
toString() |
public int getCol()
public int getRow()
public int getPhase()
public void setPhase(int phase)
public int getLiveNeighbors()
public void setLiveNeighbors(int liveNeighbors)
public CellState getCellState()
#queueNextCellState(org.drools.examples.conway.CellState)
,
CellState
public void setCellState(CellState newState)
newState
- new state for this cellCellState
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.