示例#1
0
  public void prevStep() {
    game.prevStep();

    mainPanel.remove(boardPanel);
    boardPanel.removeAll();
    boardPanel.add(new JLabel(game.outputText()), BorderLayout.NORTH);
    boardPanel.add(new JLabel(game.outputBoard()), BorderLayout.CENTER);
    mainPanel.add(boardPanel);

    repaint();
    printAll(getGraphics());
  }
示例#2
0
  private void buildScreen() {

    boardPanel.add(new JLabel(game.outputText()), BorderLayout.NORTH);

    boardPanel.add(new JLabel(game.outputBoard()), BorderLayout.CENTER);

    mainPanel.add(boardPanel, BorderLayout.CENTER);

    add(mainPanel);

    setVisible(true);
  }
示例#3
0
 public void reset() {
   game.reset();
 }