Пример #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();
 }