コード例 #1
0
  /**
   * Configures the puzzle solver by creating initial and goal states from a list of predefined
   * puzzles. It also draws the GUI panels after creation of puzzle states
   *
   * @param nPuzzle represents the size of the puzzle
   */
  public void setConfiguration(final int nPuzzle) {
    initalPuzzleGraphics.setConfiguration(nPuzzle, PanelType.INITIALPANEL);
    intermediatePuzzleGraphics.setConfiguration(nPuzzle, PanelType.INTERMEDIATEPANEL);
    finalPuzzleGraphics.setConfiguration(nPuzzle, PanelType.GOALPANEL);
    initalPuzzleGraphics.repaint();
    intermediatePuzzleGraphics.repaint();
    finalPuzzleGraphics.repaint();

    constructPuzzleSolver();
  }
コード例 #2
0
 @Override
 public void genomeWindowChanged(GenomeWindowEvent evt) {
   // repaint the layers if the genome window changed
   graphicsPanel.repaint();
 }