Namespace: GameOfDeath
Assembly: GameOfDeath (in GameOfDeath.exe) Version: 1.1.1.0 (1.1.1)
Tests: GameOfDeath.Tests.GameOfDeathTests
4 unit tests call GameOfDeath.GameOfDeath.Update
Assembly: GameOfDeath (in GameOfDeath.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Implements
Updateable UpdateRemarks
Examples
[Test] public void CreateSimplestGameOfLifeEverWith1X1() { game = new GameOfDeath(1, 1); Assert.AreEqual(0, game.GenerationCount); game.Update(); Assert.AreEqual(1, game.GenerationCount); }
[Test] public void OneCellShouldDisappearAfterOneIteration() { game = new GameOfDeath(3, 3); game[1, 1] = true; game.Update(); Assert.IsFalse(game[1, 1]); }
/// <summary> /// Shapes that survive: http://en.wikipedia.org/wiki/Conway's_Game_of_Life /// </summary> [Test] public void BlockShouldStayAlive() { game = new GameOfDeath(4, 4); CreateBlock(1, 1); game.Update(); Assert.IsTrue(game[1, 1]); Assert.IsTrue(game[2, 2]); }
See Also