Package edu.ntnu.idi.idatt.model.tile
Class LudoTile
java.lang.Object
edu.ntnu.idi.idatt.model.tile.Tile
edu.ntnu.idi.idatt.model.tile.LudoTile
LudoTile.
Extends the Tile
class to represent a tile in a Ludo game.
In addition to the properties inherited from Tile
(ID, coordinates, next tile ID),
a LudoTile
has a specific type
(e.g., "track", "start", "finish", "home").
This type is used to determine special behaviors or rendering for the tile on a Ludo board.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.ntnu.idi.idatt.model.tile.Tile
getCoordinates, getNextTileId, getTileId
-
Constructor Details
-
LudoTile
Constructs aLudoTile
with the specified properties.- Parameters:
tileId
- The unique identifier for this tile.coordinates
- An array[row, col]
representing the tile's position on the board.nextTileId
- The ID of the tile that follows this one in the standard path.type
- A string describing the type of Ludo tile.
-
-
Method Details
-
getType
Gets the type of this Ludo tile.- Returns:
- The string representing the tile type.
-
setType
Sets the type of this Ludo tile.- Parameters:
type
- The new string representing the tile type.
-