Skip to content

Unclear point for the code in Blackjack example #155

@eatam

Description

@eatam
       % If the player's sum is larger than 21, he may hold one or two aces.
        if player_sum > 21:
            assert player_sum == 22
            # last card must be ace
            player_sum -= 10
        else:
            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)"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions