Examples of MazeModel


Examples of com.barrybecker4.puzzle.maze.model.MazeModel

    private int cellSize;
    private MazeRenderer renderer;


    public MazePanel() {
        maze_ = new MazeModel(100, 100);
        renderer = new MazeRenderer();
    }
View Full Code Here

Examples of maze.model.MazeModel

         @Override
         public void valueChanged(ListSelectionEvent e)
         {
            try
            {
               MazeModel selectedMaze = getSelectedMazeModel();
               if (isVisible() && this.lastSelectedMaze != selectedMaze)
               {
                  this.lastSelectedMaze = selectedMaze;
                  displayStats();
               }
View Full Code Here

Examples of maze.model.MazeModel

    * Set values in the statistics table model. This function displays all of
    * the information for the panel
    */
   private void displayStats()
   {
      MazeModel selectedMaze = this.getSelectedMazeModel();
      if (selectedMaze != null)
         this.maze = selectedMaze;

      if (this.algorithm != null && this.maze != null)
      {
View Full Code Here

Examples of maze.model.MazeModel

      interp.set("Forward", RobotStep.MoveForward);
      interp.set("Back", RobotStep.MoveBackward);
      interp.set("Left", RobotStep.RotateLeft);
      interp.set("Right", RobotStep.RotateRight);
      //We create and set a dummy maze variable so the user can analyze its methods.
      interp.set(ROBOT_MODEL_VAR_NAME, new RobotModel(new RobotModelMaster(new MazeModel(),
                                                                           MazeCell.valueOf(1, 16),
                                                                           Direction.North)));
      return interp;
   }
View Full Code Here

Examples of maze.model.MazeModel

                                          "Unable to create new maze",
                                          "Maze Creation Error",
                                          JOptionPane.OK_OPTION);
            return;
         }
         MazeModel mm = newMi.getModel();
         mm.setSize(dialog.getMazeSize());
      }
   }
View Full Code Here

Examples of maze.model.MazeModel

      random.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent e)
         {
            final MazeModel maze = mMazeView.getModel();
            if (maze != null)
            {
               maze.generateRandomMaze();
               mMazeView.repaint();
            }
         }
      });
      return random;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.