-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear point for the code in Blackjack example #155
Comments
The description of the example 5.1 of the book states:
Therefore, if the condition player_sum > 21 is satisfied, this means that it came out one of the following combinations (otherwise we would be outside of the while loop):
In both cases, the sum is equal to 22 and the ace (the second one for the first case) is not usable since the player goes bust and therefore it is correct not to set "usable_ace_player |= (1 == card)". |
Question: in the "if" part of the above code, when last card must be ace, why do you not set "usable_ace_player |= (1 == card)"?
The text was updated successfully, but these errors were encountered: