public void CountWithOneCell() { int x = 0; int y = 0; World world = new World(); world.AddCell(x, y); world.Count(); int expected = 1; Assert.AreEqual(expected, world.Count()); }
public void DeathRule() { World world = new World(); world.AddCell(0, 0); world.AddCell(0, 1); world.AddCell(-1, -1); Assert.AreEqual(3, world.Count()); List<Cell> actual= world.AngelOfDeath(); Assert.AreEqual(2, actual.Count); }
public void JudgmentOfGodAddsToCellsAndIgnoresDuplicates() { World world = new World(); world.AddCell(0, 0); world.AddCell(0, 1); world.AddCell(0, -1); Assert.AreEqual(3, world.Count()); world.JudgmentOfGod(); Assert.IsNotNull(world.GetCell(0,0)); Assert.IsNotNull(world.GetCell(1, 0)); Assert.IsNotNull(world.GetCell(-1, 0)); Assert.AreEqual(3, world.Count()); }
public void CountWithNoCells() { World world = new World(); int expected = 0; Assert.AreEqual(expected, world.Count()); }
public void LifeRuleWithTwoNewCells() { World world = new World(); world.AddCell(0, 0); world.AddCell(0, 1); world.AddCell(0, -1); Assert.AreEqual(3, world.Count()); List<Cell> listWithDupilicatesOfNewCells = world.ActOfGod(); Assert.AreEqual(6, listWithDupilicatesOfNewCells.Count); }
public void LifeRuleWithOneNewCell() { World world = new World(); world.AddCell(0, 0); world.AddCell(-1, 0); world.AddCell(0, 1); Assert.AreEqual(3, world.Count()); List<Cell> expectedWithDuplicates = world.ActOfGod(); Assert.AreEqual(3, expectedWithDuplicates.Count); }