Interface ShelfInterface

All Superinterfaces:
Remote
All Known Implementing Classes:
ClientShelf, Shelf

public interface ShelfInterface extends Remote
Shelf Interface
  • Field Summary

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

    Modifier and Type
    Method
    Description
    getCardImage(int x, int y)
    Returns Object Card's image path in position (x, y) if valid (else null)
    int
    getCardOrdinal(int x, int y)
    Returns Object Card's type ordinal in position (x, y) if valid (else -1)
    boolean
     
  • Field Details

    • SHELF_DIM_X

      static final int SHELF_DIM_X
      Maximum X dimension of the shelf
      See Also:
    • SHELF_DIM_Y

      static final int SHELF_DIM_Y
      Maximum Y dimension of the shelf
      See Also:
  • Method Details

    • getCardOrdinal

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

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

      boolean isFull() throws RemoteException
      Returns:
      true if the Shelf is full
      Throws:
      RemoteException - related to RMI