org.univ.paris5.GameOfLife
Interface Grid

All Known Implementing Classes:
GridWorld

public interface Grid

It contains generic methods to operate on a cell grid.


Method Summary
 void clear()
          Clears grid.
 java.awt.Dimension getDimension()
          Get dimension of cellgrid.
 java.util.Enumeration getEnum()
          Get cell-enumerator.
 State getStateCell(int col, int row)
          Get status of cell.
 void resize(int col, int row)
          Resize the cell grid.
 void setCell(int col, int row, State state)
          Set status of cell (alive or dead).
 

Method Detail

getStateCell

State getStateCell(int col,
                   int row)
Get status of cell.

Parameters:
col - x-position
row - y-position
Returns:
living or not

setCell

void setCell(int col,
             int row,
             State state)
Set status of cell (alive or dead).

Parameters:
col - x-position
row - y-position
cell - living or not

resize

void resize(int col,
            int row)
Resize the cell grid.

Parameters:
col - new number of columns.
row - new number of rows.

clear

void clear()
Clears grid.


getDimension

java.awt.Dimension getDimension()
Get dimension of cellgrid.

Returns:
dimension

getEnum

java.util.Enumeration getEnum()
Get cell-enumerator. Enumerates over all living cells (type Cell).

Returns:
Enumerator over Cell.
See Also:
Cell