Пример #1
0
 private void UpdateCells()
 {
     for (var i = 0; i < grid.gridLength; i++)
     {
         for (var j = 0; j < grid.gridWidth; j++)
         {
             Cell currentCell = grid.QueryContents(i, j);
             if (currentCell.IsAliveNextCycle())
             {
                 currentCell.Live();
             }
             else
             {
                 currentCell.Die();
             }
         }
     }
 }
Пример #2
0
 public void ADeadCellCanLive()
 {
     cell.Live();
     Assert.IsTrue(cell.isAlive());
 }
Пример #3
0
 public void Init()
 {
     cell     = new Cell();
     livecell = new Cell();
     livecell.Live();
 }
Пример #4
0
 public void PlaceLivingCell(int x, int y)
 {
     cell = grid.QueryContents(x, y);
     cell.Live();
 }