Class ClientShelf

java.lang.Object
it.polimi.ingsw.Client.ClientModel.ClientShelf
All Implemented Interfaces:
ShelfInterface, Remote

public class ClientShelf extends Object implements ShelfInterface
Shelf (Client)
  • Field Details

  • Constructor Details

    • ClientShelf

      public ClientShelf()
  • Method Details

    • getCardOrdinal

      public int getCardOrdinal(int x, int y) throws Exception
      Returns Object Card's type ordinal in position (x, y) if valid (else -1)
      Specified by:
      getCardOrdinal in interface ShelfInterface
      Parameters:
      x - coordinate
      y - coordinate
      Returns:
      requested Object Card's type ordinal
      Throws:
      Exception - if coordinates are invalid
    • getCardImage

      public String getCardImage(int x, int y) throws Exception
      Returns Object Card's image path in position (x, y) if valid (else null)
      Specified by:
      getCardImage in interface ShelfInterface
      Parameters:
      x - coordinate
      y - coordinate
      Returns:
      the card's image path
      Throws:
      Exception - if parameters are trying to go out of the board
    • isFull

      public boolean isFull() throws RemoteException
      Specified by:
      isFull in interface ShelfInterface
      Returns:
      true if the Shelf is full
      Throws:
      RemoteException - related to RMI