Beispiel #1
0
        public void FlipCell()
        {
            InfiniteMap map = new InfiniteMap(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);
        }
Beispiel #2
0
        public void GetCell()
        {
            InfiniteMap map = new InfiniteMap(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);
        }
Beispiel #3
0
 public void Tick()
 {
     InfiniteMap map = new InfiniteMap(GameRules.Standard());
     map.Tick();
 }