Beispiel #1
0
        public void worldIsRound()
        {
            Square s = new BasicSquare();

            Square[,] grid = new Square[, ] {
                { s }
            };
            factory.CreateBoard(grid);
            Assert.AreEqual(s, s.GetSquareAt(Direction.NORTH));
            Assert.AreEqual(s, s.GetSquareAt(Direction.SOUTH));
            Assert.AreEqual(s, s.GetSquareAt(Direction.WEST));
            Assert.AreEqual(s, s.GetSquareAt(Direction.EAST));
        }
Beispiel #2
0
        public void connectedSouth()
        {
            Square s1 = new BasicSquare();
            Square s2 = new BasicSquare();

            Square[,] grid = new Square[, ] {
                { s1, s2 }
            };
            factory.CreateBoard(grid);
            Assert.AreEqual(s2, s1.GetSquareAt(Direction.SOUTH));
            Assert.AreEqual(s1, s2.GetSquareAt(Direction.SOUTH));
        }