public void TestMethod1() { RandomMaze maze; maze = new RandomMaze(15, 9); //cube = new Cube(); maze.GenerateMaze(); maze.printMaze(); maze.setStartPointAndDestPoint(); maze.printMaze(); }
public void MazeGenerationTest3() { int dimension = 100; int dumbSmart = dimension / 10 * 3; int seed = 3122; RandomMaze maze = new RandomMaze(dimension, seed, 0.50f); Node destPoint1 = maze.generatePossibleDestPoint(maze.edgePoints, maze.startPoint); maze.GenerateMazeWithDestBranch(1, 1); maze.printMaze(); }
public void MazeGenerationTest2() { int dimension = 100; int dumbSmart = dimension / 10 * 3; int seed = 3122; RandomMaze maze = new RandomMaze(dimension, seed, 0.50f); Node destPoint1 = maze.generatePossibleDestPoint(maze.edgePoints, maze.startPoint); Console.Write("destPoint 1 + " + destPoint1); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(0, 0, 1, 1)); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(100, 100, 1, 1)); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(5, 19, 1, 1)); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(10, 19, 1, 1)); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(19, 5, 1, 1)); //maze.updateMazeRoad(maze.generateDumbPathToDestPoint(0,0, dumbSmart, dumbSmart)); maze.GenerateMazeWithRandomPoint(50, 1, 1); maze.printMaze(); }
public void MazeTest() { AstarSearch astar = new AstarSearch(); int dimension = 20; int dumbSmart = dimension / 10 * 2; int seed = 34534; List<Node> path = null; RandomMaze maze = new RandomMaze(dimension,seed,0.85f); path = maze.generateDumbPathToDestPoint(maze.destX,maze.destY,dumbSmart, dumbSmart); Console.WriteLine(" -- path count " + path.Count); maze.astar.printPath(path); maze.updateMazeRoad(path); maze.printMaze(); Console.WriteLine("-----------------astar---------------------"); astar.printPath(astar.FindPath(astar.Float2DtoInt(maze.maze),1,maze.startPoint.x,maze.startPoint.y,maze.destPoint.x, maze.destPoint.y)); }