Exemplo n.º 1
0
 /** Display the maze */
 @Override
 public void displayMaze3d(Maze3d maze, String name) {
   this.setMaze(maze);
   mazeDisplayer.setCharacter(maze.getStartPosition());
   mazeDisplayer.setGoalPosition(maze.getGoalPosition());
   mazeDisplayer.setMazeData(
       maze.getCrossSectionByY(((Position) mazeDisplayer.getCharacter()).getpY()));
   mazeDisplayer.draw(section);
   mazeDisplayer.redraw();
 }
Exemplo n.º 2
0
  /** Print the solution */
  @Override
  public void displaySolution(Solution<Position> sol, String name) {
    ArrayList<State<Position>> temp = new ArrayList<State<Position>>();
    for (int i = sol.getSol().size() - 1; i >= 0; i--) {
      temp.add(sol.getSol().get(i));
    }

    mazeDisplayer.setSol(new Solution<Position>(temp));
    mazeDisplayer.draw(section);
    mazeDisplayer.redraw();
  }
Exemplo n.º 3
0
 /**
  * Display the cross section (x/y/z)
  *
  * @param arr
  * @param sectionType
  * @param name
  * @param section
  */
 @Override
 public void displayCrossSection(int[][] arr, String sectionType, String name, String section) {
   mazeDisplayer.setMazeData(arr);
   mazeDisplayer.draw(this.section);
   mazeDisplayer.redraw();
 }