public void ShouldReturnDeadIfAliveAnd4OrMoreAliveNeighbours() { var gameOfLifeRule = new GameOfLifeRules(); var deadOrAliveNeighbourCount = new DeadOrAliveNeighboursCount { AliveNeighbourCount = 4 }; var result = gameOfLifeRule.LifeStatusForNextTick(deadOrAliveNeighbourCount, LifeStatus.Alive); Assert.AreEqual(LifeStatus.Dead, result); }
public void ShouldNotReturnAliveIfAliveAnd2AliveNeighbours() { var gameOfLifeRule = new GameOfLifeRules(); var deadOrAliveNeighbourCount = new DeadOrAliveNeighboursCount { AliveNeighbourCount = 2 }; var result = gameOfLifeRule.LifeStatusForNextTick(deadOrAliveNeighbourCount, LifeStatus.Alive); Assert.AreEqual(LifeStatus.Alive, result); }