Class GamePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GamePanel extends JPanel
The main panel of the game, containing the board and the control panel.
See Also:
  • Constructor Details

    • GamePanel

      public GamePanel()
      Creates a new GamePanel.
  • Method Details

    • getBoard

      public Board getBoard()
      Returns the board of the game.
      Returns:
      the board of the game
    • setMenuPanel

      public void setMenuPanel(MenuPanel menuPanel)
      Sets the menu panel.
      Parameters:
      menuPanel - the menu panel
    • startNewGame

      public void startNewGame(Board starterBoard)
      Starts a new game.
      Parameters:
      starterBoard - the board to start the game with
    • addSaveGameListener

      public void addSaveGameListener(ActionListener listener)
      Adds a listener to the pass button.
      Parameters:
      listener - the listener
    • addReturnToMenuListener

      public void addReturnToMenuListener(ActionListener listener)
      Adds a listener to the pass button.
      Parameters:
      listener - the listener