Created
June 14, 2014 19:43
-
-
Save scyclow/b7216fa8affdf4e52c0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_players(number_players, chips): | |
#creates dictionary of players, starting with the dealer (the 0th player). | |
#0th item in list is the value of the hand, | |
#1st is the actual 1st and 2nd cards held | |
#2nd is number of high aces | |
#3rd is the number of chips left | |
players = [[0, [None,None], 0, 999999999999]] | |
i = 1 | |
while i<= number_players: | |
# player number: value, cards in hand, number of high aces, chips | |
#ex. players[2] = [21, [('Ace','spades'),(10,'hearts')], 1, 10,000] | |
players.append([0, [None,None], 0, chips]) | |
i = i+1 | |
return players |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment