Class BlackJackPlayer
java.lang.Object
de.presti.ree6.game.core.base.GamePlayer
de.presti.ree6.game.impl.blackjack.entities.BlackJackPlayer
Class entity used to represent a player in the game of blackjack.
-
Constructor Summary
ConstructorDescriptionBlackJackPlayer
(long relatedUserId) BlackJackPlayer
(GamePlayer gamePlayer) Constructor.BlackJackPlayer
(net.dv8tion.jda.api.entities.User relatedUser) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()
Gets the hand of the Player.getHandAsString
(boolean showHidden) Gets the hand of the Player as Emojis.int
getHandValue
(boolean countHidden) Gets the overall value of the Players hand.Methods inherited from class de.presti.ree6.game.core.base.GamePlayer
getRelatedUser, setInteractionHook
-
Constructor Details
-
BlackJackPlayer
public BlackJackPlayer(net.dv8tion.jda.api.entities.User relatedUser) -
BlackJackPlayer
public BlackJackPlayer(long relatedUserId) -
BlackJackPlayer
Constructor.- Parameters:
gamePlayer
- The game player.
-
-
Method Details
-
getHandValue
public int getHandValue(boolean countHidden) Gets the overall value of the Players hand.- Parameters:
countHidden
- Whether to count the value of hidden cards or not.- Returns:
- The overall value of the Players hand.
-
getHandAsString
Gets the hand of the Player as Emojis.- Parameters:
showHidden
- Whether to show hidden cards or not.- Returns:
- The hand of the Player as Emojis.
-
getHand
Gets the hand of the Player.- Returns:
- The hand of the Player.
-