Exemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     game = new Game();
     generation = 0;
     //drawTimer.Start();
 }
Exemplo n.º 2
0
        public void GameStillLife1()
        {
            Game g = new Game();
            g.InitGrid(TestData.StillLife.Pond.Cells);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.StillLife.Pond.String);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.StillLife.Pond.String);
        }
Exemplo n.º 3
0
        public void GameOscillator1()
        {
            Game g = new Game();

            g.InitGrid(TestData.Oscillator.Blinker.Cells1);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Oscillator.Blinker.String2);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Oscillator.Blinker.String1);
        }
Exemplo n.º 4
0
        public void GameSpaceShip1()
        {
            Game g = new Game();

            g.InitGrid(TestData.Spaceship.LWSS.Cells0);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Spaceship.LWSS.String1);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Spaceship.LWSS.String2);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Spaceship.LWSS.String3);

            g.Update();
            Assert.AreEqual(g.ToString(), TestData.Spaceship.LWSS.String4);
        }