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 boolean
alive
private int
matrixPosition
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Cell
clone()
int
getMatrixPosition()
boolean
isAlive()
boolean
isDead()
void
setAlive()
void
setDead()
void
setMatrixPosition(int position)
void
setState(boolean alive)
-
Field Details
-
alive
private boolean alive -
matrixPosition
private int matrixPosition
-
-
Constructor Details
-
Method Details
-
clone
- Overrides:
clone
in 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()
-