BLACKJACK
- User insert number of players.
- If player number is less than one or a non integer, go back to step 1.
- If input is greater than or equal to one, go to step 2.
- Ask for bet from each player.
- Assign cards value
- If card is 2-9, card’s value is that card number.
- If card is 10, Jack, Queen King, card value is 10.
- If card is Ace, player determines whether value is 1 or 11.
- Give each player random card
- If card is Ace, player determines whether value is 1 or 11.
- Give each player one more card.
- Assign each user with a value totaling the value in their deck.
- Check value of each player’s deck.
- If player has deck == 21, player wins.
- If all under 21 go to next step
- If any players have two of the same card in their deck, ask if they want to split
- If yes, that player splits cards into two hands they are given two random cards.
- Go to step 6
- Ask each player hit, stand, or double down
- If hit, give them a card
- If at 21, player wins
- If stand, no card
- If double down, double bet and draw one card
- If at 21, player wins
- If anyone hit and are under 21, ask if they want to hit again.
- If hit, give them a card
- Is anyone over 21?
- If yes, that player loses
- If no, go to step 10
- Dealers second card is flipped and evaluated
- If under 16, dealer hits until he gets a value => 17
- If the dealer busts, everyone not over 21 wins their money back 100%
- If you got a blackjack and the dealer doesn’t, it’s a push. Player gets money back.
- If the player and the dealer gets a black jack, they get no money back.
CONNECT 4