Copy the player list in pbot.py so we kill all players.
authorW. Trevor King <wking@drexel.edu>
Tue, 7 Dec 2010 16:49:03 +0000 (11:49 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 7 Dec 2010 16:49:03 +0000 (11:49 -0500)
In the previous implementation, Table removed players from the list as
they died, so the `finally` block in pbot.py only killed the winner.

pbot.py

diff --git a/pbot.py b/pbot.py
index af7a3fb37ef53b8062c1c42f744f88121f9576d8..0e7f32ed80ef4ad179ea574c3c271ec5b5a25ab4 100755 (executable)
--- a/pbot.py
+++ b/pbot.py
@@ -65,7 +65,7 @@ if __name__ == '__main__':
         players.append(Player(name=name, brain=brain))
 
     try:
-        run(players=players, blinds=blinds, start_stack=options.stack,
+        run(players=list(players), blinds=blinds, start_stack=options.stack,
             hand_limit=options.limit, tournaments=options.tournaments,
             verbose=options.verbose)
     finally:  # kill the bots