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 TypeMethodDescriptionvoidaddPlayedCard(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>> intgetToken()voidsetAvailableSpots(Set<Position> availableSpots) voidsetConnectionStatus(GameController.UserGameContext.ConnectionStatus connectionStatus) voidsetForbiddenSpots(Set<Position> forbiddenSpots) voidvoidsetNickname(String nickname) voidsetObjectiveCard(Card objectiveCard) voidsetObjectiveCards(CardPair<ObjectiveCard> objectiveCards) voidsetPoints(int points) voidsetToken(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
-