Class LudoTile

java.lang.Object
edu.ntnu.idi.idatt.model.tile.Tile
edu.ntnu.idi.idatt.model.tile.LudoTile

public class LudoTile extends Tile
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 Details

    • LudoTile

      public LudoTile(int tileId, int[] coordinates, int nextTileId, String type)
      Constructs a LudoTile 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

      public String getType()
      Gets the type of this Ludo tile.
      Returns:
      The string representing the tile type.
    • setType

      public void setType(String type)
      Sets the type of this Ludo tile.
      Parameters:
      type - The new string representing the tile type.