Package edu.ntnu.idi.idatt.factory.board
Interface BoardFactory
- All Known Implementing Classes:
LadderBoardFactory
,LudoBoardFactory
public interface BoardFactory
BoardFactory Interface.
Defines the necessary methods for factories that create game boards.
Implementations of this interface are responsible for instantiating different types of boards.
-
Method Summary
Modifier and TypeMethodDescriptioncreateBlankBoard
(int rows, int columns) Creates a blank game board with the specified number of rows and columns.createBoard
(String variant) Creates a game board of a specific variant.createBoardFromFile
(String filePath) Creates a game board by loading its configuration from a file.
-
Method Details
-
createBoard
Creates a game board of a specific variant.- Parameters:
variant
- A string identifier for the board variant.- Returns:
- The created
Board
instance.
-
createBoardFromFile
Creates a game board by loading its configuration from a file.- Parameters:
filePath
- The path to the file containing the board data.- Returns:
- The created
Board
instance.
-
createBlankBoard
Creates a blank game board with the specified number of rows and columns.- Parameters:
rows
- The number of rows for the board.columns
- The number of columns for the board.- Returns:
- The created
Board
instance.
-