Esempio n. 1
0
        public void KnockWall_removes_east_wall_if_neighbour_is_east()
        {
            var current = new Cell(0, 0);
            var neighbour = new Cell(1, 0);
            var maze = new Maze(5, 5);
            maze.TestKnockWall(current, neighbour);

            Assert.IsFalse(current.AreAllWallsIntact, "Current has still all walls intact.");
            Assert.IsFalse(neighbour.AreAllWallsIntact, "Neighbour has still all walls intact.");
            Assert.IsFalse(current.HasEastWall, "Current still has east wall.");
            Assert.IsFalse(neighbour.HasWestWall, "Neighbour still has west wall.");
        }
Esempio n. 2
0
        public void KnockWall_removes_north_wall_if_neighbour_is_north()
        {
            var current = new Cell(0, 1);
            var neighbour = new Cell(0, 0);
            var maze = new Maze(5, 5);
            maze.TestKnockWall(current, neighbour);

            Assert.IsFalse(current.AreAllWallsIntact, "Current has still all walls intact.");
            Assert.IsFalse(neighbour.AreAllWallsIntact, "Neighbour has still all walls intact.");
            Assert.IsFalse(current.HasNorthWall, "Current still has north wall.");
            Assert.IsFalse(neighbour.HasSouthWall, "Neighbour still has south wall.");
        }