Skip to content

Commit

Permalink
Fix bug that game continued if there is only one user
Browse files Browse the repository at this point in the history
  • Loading branch information
chihshun-ma committed Jul 26, 2018
1 parent f8d69a1 commit e108392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion holdem/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def step(self, actions):
players.remove(folded_player)
self._folded_players.append(folded_player)

if len([p for p in players if not p.isallin]) < 1:
if len([p for p in players if not p.isallin]) < 1 or len(players) <= 1:
while self._round < 4:
self._resolve(players)
elif self._current_player.playedthisround:
Expand Down

0 comments on commit e108392

Please sign in to comment.