org.drools.examples.conway
Class CellGridImpl
java.lang.Object
org.drools.examples.conway.CellGridImpl
- All Implemented Interfaces:
- CellGrid
public class CellGridImpl
- extends Object
- implements CellGrid
A CellGrid represents a grid of Cell objects.
- See Also:
Cell
|
Constructor Summary |
CellGridImpl(int rows,
int columns,
int executionControl)
Constructs a CellGrid |
CellGridImpl
public CellGridImpl(int rows,
int columns,
int executionControl)
- Constructs a CellGrid
- Parameters:
rows - number of rows in the gridcolumns - number of columns in the grid
getCellAt
public Cell getCellAt(int row,
int column)
- Specified by:
getCellAt in interface CellGrid
getNumberOfRows
public int getNumberOfRows()
- Specified by:
getNumberOfRows in interface CellGrid
getNumberOfColumns
public int getNumberOfColumns()
- Specified by:
getNumberOfColumns in interface CellGrid
nextGeneration
public boolean nextGeneration()
- Specified by:
nextGeneration in interface CellGrid
killAll
public void killAll()
- Specified by:
killAll in interface CellGrid
setPattern
public void setPattern(ConwayPattern pattern)
- Specified by:
setPattern in interface CellGrid
updateCell
public void updateCell(Cell cell,
CellState state)
- Specified by:
updateCell in interface CellGrid
dispose
public void dispose()
- Specified by:
dispose in interface CellGrid
toString
public String toString()
- Specified by:
toString in interface CellGrid- Overrides:
toString in class Object
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.