Ejemplo n.º 1
0
        public void ReviveACell()
        {
            SetUp();
            test.IsDead();
            gameMaster.AddCells(test);

            //3 alive neighbors bring a dead cell to live
            GameCell alive = new GameCell(0, 0);

            alive.IsAlive();
            neighbors.Add(alive);
            alive = new GameCell(0, 0);
            alive.IsAlive();
            neighbors.Add(alive);
            alive = new GameCell(0, 0);
            alive.IsAlive();
            neighbors.Add(alive);

            test.Neighbors = neighbors;

            gameMaster.GameOfLife();

            Assert.AreEqual(true, test.Alive);
        }