Exemple #1
0
 public Cell(Position pos, bool isAlive = false)
 {
     _position = pos;
     IsAlive = isAlive;
 }
 public void PutAliveCell(Position position)
 {
     _positions.Add(position);
 }
 public Cell(Position position, CellState cellState)
 {
     this._position = position;
     this._cellState = cellState;
 }
 public CellState GetState(Position position)
 {
     if(_positions.Contains(position))
         return CellState.Alive;
     return CellState.Dead;
 }