3 ms·
It seems pretty identical to me. In Blackjack, the easiest way to make someone win is to give them 21, and make sure no one else gets 21. So if the pseudocode
by zck 11y ago
It seems pretty identical to me. In Blackjack, the easiest way to make someone win is to give them 21, and make sure no one else gets 21.
So if the pseudocode is something like:
if cheat_switch:
if active_player == "COMPUTER": #this should be "HUMAN"
make_current_player_get_21()
else:
make_current_player_get_20_or_busts()
Then the computer will always get 21, and the human player will get 20. Assume for the moment that it deals with dealing multiple cards for both the human and computer; this can be done, but isn't worth getting into.
And this could all be switched in the `active_player` check.