Skip to content

Commit

Permalink
Handle the case when next_player is not_found
Browse files Browse the repository at this point in the history
  • Loading branch information
ishikota committed Nov 16, 2016
1 parent 71232a9 commit 759b202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/players/console_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def write_hand_info(self, hand_info):
print " hole => [%s, %s]" % (hole["high"], hole["low"])

def __is_next_player(self, player, round_state):
return round_state and player == round_state["seats"][round_state["next_player"]]
return round_state and not isinstance(round_state["next_player"], str)\
and player == round_state["seats"][round_state["next_player"]]

def __gen_batch(self, is_sb=False, is_bb=False, is_next=False):
batches = []
Expand Down

0 comments on commit 759b202

Please sign in to comment.