Пример #1
0
 public void LivingCellHasOneNeighbourAndDies()
 {
     var x = new GameOfLife();
     x.setNumberOfNeighbour(1);
     Boolean isAlive = x.survives();
     Assert.IsFalse(isAlive);
 }
Пример #2
0
 public void LivingCellHasTwoNeighbourAndLife()
 {
     var x = new GameOfLife();
     x.setNumberOfNeighbour(2);
     Boolean isAlive = x.survives();
     Assert.IsTrue(isAlive);
 }
Пример #3
0
 public void DeadCellHasThreeNeighbourAndLives()
 {
     var x = new GameOfLife();
     x.setAlive(false);
     x.setNumberOfNeighbour(3);
     Boolean isAlive = x.survives();
     Assert.IsTrue(isAlive);
 }