Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do {
- printf("Do you want to (H)it or (S)tand?");
- scanf("%ch", &decision);
- tolower(decision);
- if (decision != 'h' && decision != 's') {
- printf("Pick 's' or 'h'. Try again.n");
- printf("Do you want to (H)it or (S)tand?");
- scanf("%ch", &decision);
- tolower(decision);
- }
- if (decision == 'h') {
- playershand = add_card_to_hand(&playershand, card);
- printf("Your cards:n");
- print_hand(playershand);
- playerscore = blackjack_value(playershand);
- printf("Score = %dn", playerscore);
- }
- if (decision == 's') {
- add_card_to_hand(&dealershand, card);
- print_hand(dealershand);
- }
Add Comment
Please, Sign In to add comment