Package org.todo.gameOfLife
Class Cell
java.lang.Object
org.todo.gameOfLife.Cell
- All Implemented Interfaces:
java.lang.Cloneable
public class Cell
extends java.lang.Object
implements java.lang.Cloneable
-
Field Summary
Fields Modifier and Type Field Description private booleanaliveprivate intmatrixPosition -
Constructor Summary
-
Method Summary
Modifier and Type Method Description Cellclone()intgetMatrixPosition()booleanisAlive()booleanisDead()voidsetAlive()voidsetDead()voidsetMatrixPosition(int position)voidsetState(boolean alive)
-
Field Details
-
alive
private boolean alive -
matrixPosition
private int matrixPosition
-
-
Constructor Details
-
Method Details
-
clone
- Overrides:
clonein classjava.lang.Object
-
setState
public void setState(boolean alive) -
setDead
public void setDead() -
setAlive
public void setAlive() -
isAlive
public boolean isAlive() -
isDead
public boolean isDead() -
setMatrixPosition
public void setMatrixPosition(int position) -
getMatrixPosition
public int getMatrixPosition()
-