Class 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 Detail

      • Cell

        public Cell​(int col,
                    int row)
    • Method Detail

      • 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