예제 #1
0
		if player.score > max_val:
			if not player.score > 21:
				max_val = player.score
	return max_val

# Initialize game and config dealer
num_games = init()
players.append(Player("Dealer", True))
dealer = players[len(players)-1]
dealer.live = False

# Start game/s
for game in range(0, num_games):
	# Shuffle deck and deal
	deck = Hand()
	deck.gen_deck()
	shuffle(deck)
	deal(deck)
	
	# Adjust live players to not include dealer
	live_players = len(players) - 1
	
	while not live_players == 0:
		# Print without dealer cards
		if num_games == 1:
			print_state(False)
		
		# Iterate through each player's turn
		for player in players:
			# If player busted/passed don't process
			if not player.live: