def readBlinds(self,hand): preflop = BettingRound() actions = [] playerSet = set( hand.players.keys() ) while True: try: pid = self.alternative(playerSet) except scanner.BadAlternative: break self.alternative( [ ': posts small blind ', ': posts big blind ', ': posts the ante ']) act = Action() act.action = Action.Post act.bet = self.number() actions.append( [pid, act] ) self.alternative([ '\n', ' and is all-in\n' ]) hand.addBetRound(preflop,actions)
def readBlinds(self, hand): preflop = BettingRound() actions = [] playerSet = set(hand.players.keys()) while True: try: pid = self.alternative(playerSet) except scanner.BadAlternative: break self.alternative([ ': posts small blind ', ': posts big blind ', ': posts the ante ' ]) act = Action() act.action = Action.Post act.bet = self.number() actions.append([pid, act]) self.alternative(['\n', ' and is all-in\n']) hand.addBetRound(preflop, actions)