Class BoardPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class BoardPanel extends JPanel
Represents the board panel of the game.
See Also:
  • Constructor Details

    • BoardPanel

      public BoardPanel()
      Creates a new board panel.
  • Method Details

    • getSelectedFigureLocation

      public FigureLocation getSelectedFigureLocation()
      Gets the board.
      Returns:
      The board.
    • setSelectedFigureLocation

      public void setSelectedFigureLocation(FigureLocation location)
      Sets the selected figure location.
      Parameters:
      location - The selected figure location.
    • setBoard

      public void setBoard(Board board)
      Sets the board.
      Parameters:
      board - The board to set.
    • addSpaceButtonListener

      public void addSpaceButtonListener(ActionListener listener)
      Adds a space button listener.
      Parameters:
      listener - The listener to add.
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent