Class ClientBoard

java.lang.Object
it.polimi.ingsw.Client.ClientModel.ClientBoard
All Implemented Interfaces:
BoardInterface, Remote

public class ClientBoard extends Object implements BoardInterface
Board (Client)
  • Field Details

  • Constructor Details

    • ClientBoard

      public ClientBoard()
  • Method Details

    • isSpaceUsable

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

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

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