Пример #1
0
        public void CalculateAliveNeighboursCount_AllDead()
        {
            var _currentTest = new CellState[3, 3] {
                { CellState.DEAD, CellState.SPAWNING, CellState.SPAWNING, },
                { CellState.SPAWNING, CellState.ALIVE, CellState.DEAD, },
                { CellState.DEAD, CellState.DEAD, CellState.DEAD, }
            };

            Assert.Equal(0, CellStateHelpers.CalculateAliveNeighboursCount(_currentTest, new Point {
                X = 1, Y = 1
            }));
        }
Пример #2
0
 public void DeadCellTests(int neighborsCount, CellState finalState)
 {
     Assert.Equal(finalState, CellStateHelpers.DetermineState(CellState.DEAD, neighborsCount));
 }
Пример #3
0
 public void AliveCellTests(int neighborsCount, CellState finalState)
 {
     Assert.Equal(finalState, CellStateHelpers.DetermineState(CellState.ALIVE, neighborsCount));
 }