public void Then_New_Cell_On_Same_Position_Differs_From_Old_Cell()
        {
            World world   = new World(1, 1);
            Cell  oldCell = world.GetCell(1, 1);

            world.NextGeneration();
            Cell newCell = world.GetCell(1, 1);

            Assert.AreNotEqual(oldCell, newCell);
        }
        public void Then_Cell_On_2x1_Is_Different_From_Old_On_Same_Position()
        {
            World world = new World(2, 2);
            Cell oldCell = world.GetCell(2, 1);

            world.NextGeneration();
            Cell newCell = world.GetCell(2, 1);

            Assert.AreNotEqual(oldCell, newCell);
        }
        public void Then_Cell_On_2x1_Is_Different_From_Old_On_Same_Position()
        {
            World world   = new World(2, 2);
            Cell  oldCell = world.GetCell(2, 1);

            world.NextGeneration();
            Cell newCell = world.GetCell(2, 1);

            Assert.AreNotEqual(oldCell, newCell);
        }
        public void Then_New_Cell_On_Same_Position_Differs_From_Old_Cell()
        {
            World world = new World(1, 1);
            Cell oldCell = world.GetCell(1, 1);

            world.NextGeneration();
            Cell newCell = world.GetCell(1, 1);

            Assert.AreNotEqual(oldCell, newCell);
        }
        public void Then_A_Previously_Free_Cell_With_3_Alive_Members_Becomes_Alive()
        {
            World world = new World(3, 3);
            world.SetCellAlive(1, 1);
            world.SetCellAlive(1, 2);
            world.SetCellAlive(1, 3);

            world.NextGeneration();

            Cell cell = world.GetCell(2, 2);
            Assert.IsTrue(cell.IsAlive);
        }
Exemplo n.º 6
0
        public void Then_A_Previously_Free_Cell_With_3_Alive_Members_Becomes_Alive()
        {
            World world = new World(3, 3);

            world.SetCellAlive(1, 1);
            world.SetCellAlive(1, 2);
            world.SetCellAlive(1, 3);

            world.NextGeneration();

            Cell cell = world.GetCell(2, 2);

            Assert.IsTrue(cell.IsAlive);
        }