Created
September 28, 2011 15:45
-
-
Save laat/1248284 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
#evaluate hand | |
good_hand = False | |
if phase == 0: | |
if self.card_power[0] == 2: | |
good_hand = True | |
elif self.card_power[0] == 1 and self.card_power[1] > 7: | |
good_hand = True | |
elif self.card_power[0] >= 2: | |
good_hand = True | |
#place bet | |
bet = 0 | |
if phase == 0 and good_hand and more == 0: | |
bet = self.gm.blind * 3 | |
elif good_hand and random() > 0.5: #call | |
bet = more | |
elif good_hand and random() > 0.2: #raise | |
bet = self.gm.blind*3 | |
#else fold/check | |
self.money -= bet | |
return bet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment