Package it.polimi.ingsw.Common
Interface BoardInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
Board
,ClientBoard
Game's Board Interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Maximum X dimension of the boardstatic final int
Maximum Y dimension of the board -
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
-
BOARD_DIM_X
static final int BOARD_DIM_XMaximum X dimension of the board- See Also:
-
BOARD_DIM_Y
static final int BOARD_DIM_YMaximum Y dimension of the board- See Also:
-
-
Method Details
-
isSpaceUsable
Checks if a space is usable given coordinates- 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- 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- Parameters:
x
- coordinatey
- coordinate- Returns:
- the card's image path
- Throws:
Exception
- if parameters are trying to go out of the board
-