Interface BoardInterface

All Superinterfaces:
Remote
All Known Implementing Classes:
Board, ClientBoard

public interface BoardInterface extends Remote
Game's Board Interface
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Maximum X dimension of the board
    static final int
    Maximum Y dimension of the board
  • Method Summary

    Modifier and Type
    Method
    Description
    getCardImageFromSpace(int x, int y)
    Returns Object Card's image path, given a Board Space
    int
    getCardOrdinalFromSpace(int x, int y)
    Returns Object Card's type ordinal, given a Board Space
    boolean
    isSpaceUsable(int x, int y)
    Checks if a space is usable given coordinates
  • Field Details

    • BOARD_DIM_X

      static final int BOARD_DIM_X
      Maximum X dimension of the board
      See Also:
    • BOARD_DIM_Y

      static final int BOARD_DIM_Y
      Maximum Y dimension of the board
      See Also:
  • Method Details

    • isSpaceUsable

      boolean isSpaceUsable(int x, int y) throws Exception
      Checks if a space is usable given coordinates
      Parameters:
      x - coordinate
      y - coordinate
      Returns:
      usability of that space
      Throws:
      Exception - if parameters are trying to go out of the board
    • getCardOrdinalFromSpace

      int getCardOrdinalFromSpace(int x, int y) throws Exception
      Returns Object Card's type ordinal, given a Board Space
      Parameters:
      x - coordinate
      y - coordinate
      Returns:
      the card's ordinal
      Throws:
      Exception - if parameters are trying to go out of the board
    • getCardImageFromSpace

      String getCardImageFromSpace(int x, int y) throws Exception
      Returns Object Card's image path, given a Board Space
      Parameters:
      x - coordinate
      y - coordinate
      Returns:
      the card's image path
      Throws:
      Exception - if parameters are trying to go out of the board