Is there an elegant way to deal with the Ace in Blackjack?

前端 未结 7 1259
心在旅途
心在旅途 2020-12-06 10:19

My kiddo had a homework assignment to write Blackjack in Java. I helped him a little but for the most part he did it all himself and it actually plays pretty well. He even c

7条回答
  •  清歌不尽
    2020-12-06 11:17

    The problem is that it's not determined: you can count (as I understand the rules) an Ace as either 1 or 11. But you know you're not going to count it as 11 every time, because you'll bust.

    The only solution I think is to compute the score for each possible value of the ace where the sum <= 21.

提交回复
热议问题