def itsYourTurn(self, last_chance=False): PokerClientProtocol.itsYourTurn(self) time.sleep(random.randint(1, 2)) if last_chance: self.executeCmd("call") return rand = random.random() if rand < 0.3: self.executeCmd("raise 1000") elif rand < 0.4: self.executeCmd("fold") else: self.executeCmd("call")
def itsYourTurn(self, last_chance=False): PokerClientProtocol.itsYourTurn(self) time.sleep(random.randint(1,2)) if last_chance: self.executeCmd("call") return rand = random.random() if rand < 0.3: self.executeCmd("raise 1000") elif rand < 0.4: self.executeCmd("fold") else: self.executeCmd("call")
def defaultHandler(self, packet): if packet.type == PACKET_POKER_STATE and packet.string == GAME_STATE_END: self.checkIfRebuy() PokerClientProtocol.defaultHandler(self, packet)
def changeState(self, new_state): PokerClientProtocol.changeState(self, new_state) if new_state == STATE_JOIN: self.executeCmd("seat") self.executeCmd("buy_in")