Class ClientShelf
java.lang.Object
it.polimi.ingsw.Client.ClientModel.ClientShelf
- All Implemented Interfaces:
ShelfInterface
,Remote
Shelf (Client)
-
Field Summary
Modifier and TypeFieldDescriptionprivate Optional<ClientObjectCard>[][]
Shelf implementation of Object CardsFields inherited from interface it.polimi.ingsw.Common.ShelfInterface
SHELF_DIM_X, SHELF_DIM_Y
-
Constructor Summary
-
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
-
cards
Shelf implementation of Object Cards
-
-
Constructor Details
-
ClientShelf
public ClientShelf()
-
-
Method Details
-
getCardOrdinal
Returns Object Card's type ordinal in position (x, y) if valid (else -1)- Specified by:
getCardOrdinal
in interfaceShelfInterface
- 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)- Specified by:
getCardImage
in interfaceShelfInterface
- Parameters:
x
- coordinatey
- coordinate- Returns:
- the card's image path
- Throws:
Exception
- if parameters are trying to go out of the board
-
isFull
- Specified by:
isFull
in interfaceShelfInterface
- Returns:
- true if the Shelf is full
- Throws:
RemoteException
- related to RMI
-