Class ClientBoard
java.lang.Object
it.polimi.ingsw.Client.ClientModel.ClientBoard
- All Implemented Interfaces:
BoardInterface
,Remote
Board (Client)
-
Field Summary
Fields inherited from interface it.polimi.ingsw.Common.BoardInterface
BOARD_DIM_X, BOARD_DIM_Y
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCardImageFromSpace
(int x, int y) Returns Object Card's image path, given a Board Spaceint
getCardOrdinalFromSpace
(int x, int y) Returns Object Card's type ordinal, given a Board Spaceboolean
isSpaceUsable
(int x, int y) Checks if a space is usable given coordinates
-
Field Details
-
spaces
-
-
Constructor Details
-
ClientBoard
public ClientBoard()
-
-
Method Details
-
isSpaceUsable
Checks if a space is usable given coordinates- Specified by:
isSpaceUsable
in interfaceBoardInterface
- Parameters:
x
- coordinatey
- coordinate- Returns:
- usability of that space
- Throws:
Exception
- if parameters are trying to go out of the board
-
getCardOrdinalFromSpace
Returns Object Card's type ordinal, given a Board Space- Specified by:
getCardOrdinalFromSpace
in interfaceBoardInterface
- Parameters:
x
- coordinatey
- coordinate- Returns:
- the card's ordinal
- Throws:
Exception
- if parameters are trying to go out of the board
-
getCardImageFromSpace
Returns Object Card's image path, given a Board Space- Specified by:
getCardImageFromSpace
in interfaceBoardInterface
- Parameters:
x
- coordinatey
- coordinate- Returns:
- the card's image path
- Throws:
Exception
- if parameters are trying to go out of the board
-