示例#1
0
        public void SimpleMaze3()
        {
            // Arrange
            IMaze maze = SimpleMaze.CreateSimpleMaze3();

            // Act
            var(foundSolution, _) = SimpleMazeSolver.SimpleSolver(maze);

            // Assert
            Assert.False(foundSolution);
        }
示例#2
0
        public void Daedelus_63x63()
        {
            // Arrange
            var maze = ImageBasedMaze.Create("../../../../images/31x31.jpg");

            // Act
            var(foundSolution, solutionPath) = SimpleMazeSolver.SimpleSolver(maze);
            maze.SavePath(solutionPath, "../../../../images/31x31_solution.jpg");

            // Assert
            Assert.True(foundSolution);
        }
示例#3
0
        public void SimpleMaze2()
        {
            // Arrange
            IMaze maze = SimpleMaze.CreateSimpleMaze2();

            // Act
            var(foundSolution, solutionPath) = SimpleMazeSolver.SimpleSolver(maze);
            maze.SavePath(solutionPath, "../../../../images/SimpleMaze2_solution.jpg");

            // Assert
            Assert.True(foundSolution);
        }
示例#4
0
        public void Computerphile_Maze()
        {
            // Arrange
//            Console.WriteLine($"{Directory.GetCurrentDirectory()}");
            var maze = ImageBasedMaze.Create("../../../../images/Computerphile.jpg");

            // Act
            var(foundSolution, solutionPath) = SimpleMazeSolver.SimpleSolver(maze);
            maze.SavePath(solutionPath, "../../../../images/Computerphile_solution.jpg");

            // Assert
            Assert.True(foundSolution);
        }