Class Tile

java.lang.Object
edu.ntnu.idi.idatt.model.tile.Tile
Direct Known Subclasses:
LadderGameTile, LudoTile

public abstract class Tile extends Object
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 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

      public Tile(int tileId, int[] coordinates, int nextTileId, TileAction tileAction)
      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.