Package it.polimi.ingsw.Common
Interface ShelfInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
ClientShelf
,Shelf
Shelf Interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Maximum X dimension of the shelfstatic final int
Maximum Y dimension of the shelf -
Method Summary
Modifier and TypeMethodDescriptiongetCardImage
(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
isFull()
-
Field Details
-
SHELF_DIM_X
static final int SHELF_DIM_XMaximum X dimension of the shelf- See Also:
-
SHELF_DIM_Y
static final int SHELF_DIM_YMaximum Y dimension of the shelf- See Also:
-
-
Method Details
-
getCardOrdinal
Returns Object Card's type ordinal in position (x, y) if valid (else -1)- Parameters:
x
- coordinatey
- coordinate- Returns:
- requested Object Card's type ordinal
- Throws:
Exception
- if coordinates are invalid
-
getCardImage
Returns Object Card's image path in position (x, y) if valid (else null)- Parameters:
x
- coordinatey
- coordinate- Returns:
- the card's image path
- Throws:
Exception
- if parameters are trying to go out of the board
-
isFull
- Returns:
- true if the Shelf is full
- Throws:
RemoteException
- related to RMI
-