[go: up one dir, main page]

0% found this document useful (0 votes)
16 views1 page

Blackjack Flowchart

The document describes a card game scenario between a user and a computer, detailing the process of drawing cards and calculating scores. The user initially has a score of 15 and the computer has 9, but the computer ultimately wins with a score of 19 compared to the user's 18. The game includes conditions for blackjack, busts, and comparing scores to determine the winner.

Uploaded by

Medsaidboyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Blackjack Flowchart

The document describes a card game scenario between a user and a computer, detailing the process of drawing cards and calculating scores. The user initially has a score of 15 and the computer has 9, but the computer ultimately wins with a score of 19 compared to the user's 18. The game includes conditions for blackjack, busts, and comparing scores to determine the winner.

Uploaded by

Medsaidboyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

START

The user and computer should


User: [5, 10] Computer: [3, 6]
each get 2 random cards.

Add up the user's and


User = 15 Computer = 9
the computer's scores

User has blackjack


Win
Does the user or
No Blackjacks computer have a blackjack? Lose
(ace + 10) Computer has blackjack

Yes
No Lose
No

Yes If the ace counts


Do they have an
Is user's score over 21? as a 1 instead of 11, are they
"Ace"? Yes still over 21?

No
No

Answer = "Yes" Yes


Ask the user if they want
User: [5, 10, 3] to get another card.
Draw another card

No

Computer: [3, 6]
Computer plays, if score is less
Computer: [3, 6, 10]
than 17, keep drawing cards.

Yes
Has computer gone
Win
over 21?

No

User score Compare user score with User score


Computer = 19 Win computer score to see if user Lose
higher score is higher? lower
User = 18

Same score
Outcome: Computer wins.

Draw

You might also like