Package edu.ntnu.idi.idatt.model.tile
Class Tile
java.lang.Object
edu.ntnu.idi.idatt.model.tile.Tile
- Direct Known Subclasses:
LadderGameTile
,LudoTile
Tile class
This class represents a tile in the game. It contains a tile ID, a next tile ID, and a tile action.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTile
(int tileId, int[] coordinates, int nextTileId) Constructor for Tile class.Tile
(int tileId, int[] coordinates, int nextTileId, TileAction tileAction) Constructor for Tile class. -
Method Summary
Modifier and TypeMethodDescriptionint[]
Returns the coordinates of the tile.int
Returns the ID of the next tile.int
Returns the ID of the tile.
-
Constructor Details
-
Tile
public Tile(int tileId, int[] coordinates, int nextTileId) Constructor for Tile class.- Parameters:
tileId
- The ID of the tile.nextTileId
- The ID of the next tile.
-
Tile
Constructor for Tile class.- Parameters:
tileId
- The ID of the tile.nextTileId
- The ID of the next tile.tileAction
- The tile action to perform on the tile.
-
-
Method Details
-
getTileId
public int getTileId()Returns the ID of the tile.- Returns:
- The ID of the tile.
-
getCoordinates
public int[] getCoordinates()Returns the coordinates of the tile.- Returns:
- The coordinates of the tile.
-
getNextTileId
public int getNextTileId()Returns the ID of the next tile.- Returns:
- The ID of the next tile.
-