예제 #1
0
            public void ShouldBeAbleToMoveEastInTwoCellsMaze()
            {
                var maze = new MazeEngine(false, 2);

                bool movedEast = maze.Move(Direction.East);

                Check.That(movedEast).IsTrue();
            }
예제 #2
0
            public void ShouldFindCheeseWhenCheese()
            {
                var maze = new MazeEngine(true);

                var foundIt = maze.FoundCheese();

                Check.That(foundIt).IsTrue();
            }
예제 #3
0
            public void ShouldNotFindCheeseWhenNoCheese()
            {
                var maze = new MazeEngine(false);

                var foundIt = maze.FoundCheese();

                Check.That(foundIt).IsFalse();
            }
예제 #4
0
            public void ShouldNotBeAbleToInitialMoveOtherThanEastInTwoCellsMaze()
            {
                var maze = new MazeEngine(false, 2);

                bool movedNorth = maze.Move(Direction.North);
                bool movedSouth = maze.Move(Direction.South);
                bool movedWest = maze.Move(Direction.West);
                bool movedEast = maze.Move(Direction.East);

                Check.That(movedNorth).IsFalse();
                Check.That(movedSouth).IsFalse();
                Check.That(movedWest).IsFalse();
                Check.That(movedEast).IsTrue();
            }
예제 #5
0
            public void ShouldNotBeAbleToMoveWhenInOneCellMaze()
            {
                var maze = new MazeEngine(false);

                bool movedNorth = maze.Move(Direction.North);
                bool movedEast = maze.Move(Direction.East);
                bool movedSouth = maze.Move(Direction.South);
                bool movedWest = maze.Move(Direction.West);

                Check.That(movedNorth).IsFalse();
                Check.That(movedEast).IsFalse();
                Check.That(movedSouth).IsFalse();
                Check.That(movedWest).IsFalse();
            }