Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 672 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 672 Bytes

blackjack

The rules of the games: ==>

This function lists out all permutations of ace values in the array sum_array.

For example, if you have 2 aces, there are 4 permutations: [[1,1], [1,11], [11,1], [11,11]]

These permutations lead to 3 unique sums: [2, 12, 22] Of these 3, only 2 are <=21 so they are returned: [2, 12]

Convert num_aces, an int to a list of lists For example if num_aces=2, the output should be [[1,11],[1,11]]

I require this format for the get_ace_values function

Call function ace_values to produce list of possible values for aces in hand