Modifier and Type | Field and Description |
---|---|
static int |
BLACKJACK |
static int |
BUST |
static int |
DEALER_WON |
static int |
DRAW |
static int |
GAME_IN_PROGRESS |
static int |
HAS_21 |
static int |
LESS_THAN_21 |
static int |
PLAYER_WON |
Modifier and Type | Method and Description |
---|---|
void |
createAndShuffleGameDeck()
Creates and shuffles the card deck(s) using the random
number generator that was passed in to the constructor.
|
void |
deal()
Creates new deck(s) of cards and shuffles them;
assigns cards to the dealer and player.
|
int |
getAccountAmount()
Returns the player's account amount
|
int |
getBetAmount()
Returns an integer representing the bet amount.
|
Card[] |
getDealerCards()
Returns dealer's cards.
|
int |
getDealerCardsEvaluation()
Returns an integer value that can assume the values
LESS_THAN_21 if the dealer's cards have a value less than 21,
BUST if the dealer's cards have a value greater than 21, and
BLACKJACK if the dealer has an Ace along with a "10", Jack, Queen, or King.
|
int[] |
getDealerCardsTotal()
Returns an array representing the possible value(s) associated with the
dealer's cards if the cards represent a value less than or equal to 21.
|
Card[] |
getGameDeck()
Returns the current deck(s) of cards.
|
int |
getGameStatus()
Returns an integer representing the game status.
|
int |
getNumberOfDecks()
Returns the number of decks being used.
|
Card[] |
getPlayerCards()
Returns player's cards.
|
int |
getPlayerCardsEvaluation()
Returns an integer value that can assume the values
LESS_THAN_21 if the player's cards have a value less than 21,
BUST if the players's cards have a value greater than 21, and
BLACKJACK if the player has an Ace along with a "10", Jack, Queen, or King.
|
int[] |
getPlayerCardsTotal()
Returns an array representing the possible value(s) associated with the
player's cards if the cards represent a value less than or equal to 21.
|
void |
playerHit()
Retrieves a card from the deck and assigns the card to the player.
|
void |
playerStand()
Flips the dealer's card that is currently face down
and assigns cards to the dealer as long as the dealer
doesn't bust and the cards have a value less than 16.
|
void |
setAccountAmount(int amount)
Updates the player's account with the parameter value.
|
void |
setBetAmount(int amount)
Updates the bet amount to the provided value
|
static final int DRAW
static final int LESS_THAN_21
static final int BUST
static final int BLACKJACK
static final int HAS_21
static final int DEALER_WON
static final int PLAYER_WON
static final int GAME_IN_PROGRESS
int getNumberOfDecks()
void createAndShuffleGameDeck()
Card[] getGameDeck()
void deal()
Card[] getDealerCards()
int[] getDealerCardsTotal()
int getDealerCardsEvaluation()
Card[] getPlayerCards()
int[] getPlayerCardsTotal()
int getPlayerCardsEvaluation()
void playerHit()
void playerStand()
void setBetAmount(int amount)
int getBetAmount()
void setAccountAmount(int amount)
amount
- int getAccountAmount()
int getGameStatus()