|
Game of Life 1.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface between GameOfLifeCanvas and GameOfLife. This way GameOfLifeCanvas is generic, independent of GameOfLife. It contains generic methods to operate on a cell grid.
| Method Summary | |
void |
clear()
Clears grid. |
boolean |
getCell(int col,
int row)
Get status of cell (alive or dead). |
java.awt.Dimension |
getDimension()
Get dimension of cellgrid. |
java.util.Enumeration |
getEnum()
Get cell-enumerator. |
void |
resize(int col,
int row)
Resize the cell grid. |
void |
setCell(int col,
int row,
boolean cell)
Set status of cell (alive or dead). |
| Method Detail |
public boolean getCell(int col,
int row)
col - x-positionrow - y-position
public void setCell(int col,
int row,
boolean cell)
col - x-positionrow - y-positioncell - living or notpublic java.awt.Dimension getDimension()
public void resize(int col,
int row)
col - new number of columns.row - new number of rows.public java.util.Enumeration getEnum()
Cellpublic void clear()
|
Game of Life 1.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This API descibes the Game of Life program, written by Edwin Martin. The source code is available online too.
Copyright 1996-2004 Edwin Martin <edwin@bitstorm.org>.