Interface Board

All Known Implementing Classes:
BaseBoard, LadderGameBoard, LudoGameBoard

public interface Board
Board interface

Interface defining common operations for all board game boards.

  • Method Details

    • getName

      String getName()
      Gets the name of the board.
      Returns:
      the name of the board
    • getDescription

      String getDescription()
      Gets the description of the board.
      Returns:
      the description of the board
    • getBackground

      String getBackground()
      Gets the background of the board.
      Returns:
      the background of the board
    • getTile

      Tile getTile(int tileId)
      Gets a tile by its ID.
      Parameters:
      tileId - the ID of the tile to get
      Returns:
      the tile with the given ID
    • getTiles

      List<Tile> getTiles()
      Gets all tiles on the board.
      Returns:
      a list of all tiles
    • getTileCount

      int getTileCount()
      Gets the total number of tiles on the board.
      Returns:
      the number of tiles
    • setName

      void setName(String name)
      Sets the name of the board.
      Parameters:
      name - the name to set
    • setDescription

      void setDescription(String description)
      Sets the description of the board.
      Parameters:
      description - the description to set
    • setBackground

      void setBackground(String background)
      Sets the background of the board.
      Parameters:
      background - the background to set
    • addTile

      void addTile(Tile tile)
      Adds a tile to the board.
      Parameters:
      tile - the tile to add
    • createTiles

      void createTiles(int rows, int columns)
      Creates the tiles for the board.
      Parameters:
      rows - the number of rows
      columns - the number of columns