Package it.polimi.ingsw.Server.Model
Class BoardSpace
java.lang.Object
it.polimi.ingsw.Server.Model.BoardSpace
Board Spaces
-
Field Summary
Modifier and TypeFieldDescriptionprivate Optional<ObjectCard>
(eventual) Object Card in the spaceNumber of (eventual) dots in the spaceprivate final boolean
Usability of the space in the board/current gameprivate final int
Coordinateprivate final int
Coordinate -
Constructor Summary
ConstructorDescriptionBoardSpace
(int x, int y, boolean usable, Optional<Integer> dots) BoardSpace class constructor -
Method Summary
-
Field Details
-
x
@Expose private final int xCoordinate -
y
@Expose private final int yCoordinate -
usable
@Expose private final boolean usableUsability of the space in the board/current game -
dots
Number of (eventual) dots in the space -
card
(eventual) Object Card in the space
-
-
Constructor Details
-
BoardSpace
BoardSpace class constructor- Parameters:
x
- coordinatey
- coordinateusable
- usability of a space in both absolute and players-dependent criteriadots
- number of dots on that space (based on a number of players)
-
-
Method Details
-
getX
public int getX()- Returns:
- x coordinate
-
getY
public int getY()- Returns:
- y coordinate
-
isUsable
public boolean isUsable()- Returns:
- usability of the space
-
getCard
- Returns:
- card in the space (as an Optional)
-
setCard
Sets the card in the space- Parameters:
card
- the card
-
getPlainCard
- Returns:
- card in the space (as a plain Nullable type)
-
getDots
- Returns:
- number of dots in a space (as Optional)
-
getPlainDots
public int getPlainDots()- Returns:
- number of dots in a space (as a plain Nullable type)
-