java.lang.Object
polimi.ingsw.am21.codex.client.localModel.LocalPlayer
The class that represents the local player.
It's included in the LocalGameBoard class
It's used to store the information about the player in the game.
It includes the player's nickname, token, points, hand, objective card, resources, objects, available spots, forbidden spots, played cards, objective cards, connection status.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLocalPlayer
(UUID connectionID) Class constructor that initializes the player with the given their connection ID. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlayedCard
(PlayableCard card, CardSideType side, Position position) Adds a card to the player's playerboard, to be used when initializing the LocalPlayergetHand()
List
<javafx.util.Pair<Position, javafx.util.Pair<PlayableCard, CardSideType>>> Map
<Position, javafx.util.Pair<PlayableCard, CardSideType>> int
getToken()
void
setAvailableSpots
(Set<Position> availableSpots) void
setConnectionStatus
(GameController.UserGameContext.ConnectionStatus connectionStatus) void
setForbiddenSpots
(Set<Position> forbiddenSpots) void
void
setNickname
(String nickname) void
setObjectiveCard
(Card objectiveCard) void
setObjectiveCards
(CardPair<ObjectiveCard> objectiveCards) void
setPoints
(int points) void
setToken
(TokenColor token)
-
Constructor Details
-
LocalPlayer
Class constructor that initializes the player with the given their connection ID.
-
-
Method Details
-
getConnectionID
-
addPlayedCard
Adds a card to the player's playerboard, to be used when initializing the LocalPlayer- Parameters:
card
- The card to addside
- The side that should be shown after the card is placedposition
- The model position in which the card has been placed
-
getNickname
-
setNickname
-
getToken
-
setToken
-
getPoints
public int getPoints() -
setPoints
public void setPoints(int points) -
getHand
-
setHand
-
getObjectiveCard
-
setObjectiveCard
-
getResources
-
getObjects
-
getAvailableSpots
-
setAvailableSpots
-
getForbiddenSpots
-
setForbiddenSpots
-
getPlayedCardsByPosition
-
getPlayedCardsByOrder
public List<javafx.util.Pair<Position,javafx.util.Pair<PlayableCard, getPlayedCardsByOrder()CardSideType>>> -
getObjectiveCards
-
setObjectiveCards
-
getConnectionStatus
-
setConnectionStatus
-