Class StandardBoardShape

java.lang.Object
net.royalur.model.shape.BoardShape
net.royalur.model.shape.StandardBoardShape

public class StandardBoardShape extends BoardShape
The standard shape of board used for The Royal Game of Ur that follows the game boards that were excavated by Sir Leonard Woolley. It has the following shape: xxxx xx xxxxxxxx xxxx xx
  • Field Details

    • BOARD_TILES

      public static final Set<Tile> BOARD_TILES
      The set of all tiles that exist on the standard board.
    • ROSETTE_TILES

      public static final Set<Tile> ROSETTE_TILES
      The set of rosette tiles that exist on the standard board.
  • Constructor Details

    • StandardBoardShape

      public StandardBoardShape()
      Instantiates the standard board shape used for the Royal Game of Ur.
  • Method Details

    • contains

      public boolean contains(Tile tile)
      Description copied from class: BoardShape
      Determines whether tile falls within this board shape.
      Overrides:
      contains in class BoardShape
      Parameters:
      tile - The tile to be bounds-checked.
      Returns:
      Whether the given tile falls within this board shape.
    • containsIndices

      public boolean containsIndices(int ix, int iy)
      Description copied from class: BoardShape
      Determines whether the tile at indices (ix, iy), 0-based, falls within the bounds of this shape of board.
      Overrides:
      containsIndices in class BoardShape
      Parameters:
      ix - The x-index of the tile to be bounds-checked. This coordinate is 0-based.
      iy - The y-index of the tile to be bounds-checked. This coordinate is 0-based.
      Returns:
      Whether the given tile falls within the bounds of this shape of board.
    • isRosette

      public boolean isRosette(Tile tile)
      Description copied from class: BoardShape
      Determines whether tile is a rosette tile in this board shape.
      Overrides:
      isRosette in class BoardShape
      Parameters:
      tile - The tile to check if it is a rosette.
      Returns:
      Whether the given tile is a rosette tile on this board.
    • isRosetteIndices

      public boolean isRosetteIndices(int ix, int iy)
      Description copied from class: BoardShape
      Determines whether the tile at the indices (ix, iy), 0-based, is a rosette tile in this board shape.
      Overrides:
      isRosetteIndices in class BoardShape
      Parameters:
      ix - The x-index of the tile to be checked for being a rosette. This coordinate is 0-based.
      iy - The y-index of the tile to be checked for being a rosette. This coordinate is 0-based.
      Returns:
      Whether the given tile is a rosette tile on this board.