Exemplo n.º 1
0
 public void IntializeFirstGenerationTest()
 {
     var grid = new Grid(5, 5);
     grid.InitializeCells();
     _resultGrid = grid.RunLife();
     IoCContainer.Container.RegisterInstance(typeof(Grid), _resultGrid);
     foreach (var row in _resultGrid.Rows)
     {
         foreach (var cell in row.Cells)
         {
             AnyLiveCellWithFewerThanTwoLiveNeighboursDies(cell);
             AnyLiveCellWithMoreThanThreeLiveNeighboursDies(cell);
             AnyLiveCellWithTwoOrThreeLiveNeighboursLives(cell);
             AnyDeadCellWithExactlyThreeLiveNeighboursComesToLife(cell);
         }
     }
 }