Пример #1
0
        public void FlipCell()
        {
            SimpleMap map = new SimpleMap(2, GameRules.Standard());
            map.FlipCell(0, 0);
            map.FlipCell(1, 0);

            Assert.AreEqual(true, map.GetCell(0, 0).IsAlive);
            Assert.AreEqual(true, map.GetCell(1, 0).IsAlive);
            Assert.AreEqual(false, map.GetCell(0, 1).IsAlive);
            Assert.AreEqual(false, map.GetCell(1, 1).IsAlive);
        }
Пример #2
0
        public void GetCell()
        {
            SimpleMap map = new SimpleMap(2, GameRules.Standard());
            Assert.AreEqual(0, map.GetCell(0, 0).Location.X);
            Assert.AreEqual(0, map.GetCell(0, 0).Location.Y);

            Assert.AreEqual(1, map.GetCell(1, 0).Location.X);
            Assert.AreEqual(0, map.GetCell(1, 0).Location.Y);

            Assert.AreEqual(0, map.GetCell(0, 1).Location.X);
            Assert.AreEqual(1, map.GetCell(0, 1).Location.Y);

            Assert.AreEqual(1, map.GetCell(1, 1).Location.X);
            Assert.AreEqual(1, map.GetCell(1, 1).Location.Y);
        }
Пример #3
0
 public void Tick()
 {
     SimpleMap map = new SimpleMap(2, GameRules.Standard());
     map.Tick();
 }