Package edu.ntnu.idi.idatt.model.board
Interface Board
- All Known Implementing Classes:
BaseBoard
,LadderGameBoard
,LudoGameBoard
public interface Board
Board interface
Interface defining common operations for all board game boards.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a tile to the board.void
createTiles
(int rows, int columns) Creates the tiles for the board.Gets the background of the board.Gets the description of the board.getName()
Gets the name of the board.getTile
(int tileId) Gets a tile by its ID.int
Gets the total number of tiles on the board.getTiles()
Gets all tiles on the board.void
setBackground
(String background) Sets the background of the board.void
setDescription
(String description) Sets the description of the board.void
Sets the name of the board.
-
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
Gets a tile by its ID.- Parameters:
tileId
- the ID of the tile to get- Returns:
- the tile with the given ID
-
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
Sets the name of the board.- Parameters:
name
- the name to set
-
setDescription
Sets the description of the board.- Parameters:
description
- the description to set
-
setBackground
Sets the background of the board.- Parameters:
background
- the background to set
-
addTile
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 rowscolumns
- the number of columns
-