forked from cs3243-poker-agent/PokerAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raise_player.py
31 lines (23 loc) · 890 Bytes
/
raise_player.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from pypokerengine.players import BasePokerPlayer
from time import sleep
import pprint
class RaisedPlayer(BasePokerPlayer):
def declare_action(self, valid_actions, hole_card, round_state):
for i in valid_actions:
if i["action"] == "raise":
action = i["action"]
return action # action returned here is sent to the poker engine
action = valid_actions[1]["action"]
return action # action returned here is sent to the poker engine
def receive_game_start_message(self, game_info):
pass
def receive_round_start_message(self, round_count, hole_card, seats):
pass
def receive_street_start_message(self, street, round_state):
pass
def receive_game_update_message(self, action, round_state):
pass
def receive_round_result_message(self, winners, hand_info, round_state):
pass
def setup_ai():
return RandomPlayer()