From fe24b6a86e0f0589639c3f1a3da65e3ac0609da4 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 9 Aug 2011 20:16:09 -0500 Subject: [PATCH] fix bug 16 --- wolfgame.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index 430f6eb..e62e564 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -789,10 +789,14 @@ def del_player(cli, nick, forced_death = False): del x[k] if var.PHASE == "day" and not forced_death and ret: # didn't die from lynching if nick in var.VOTES.keys(): - del var.VOTES[nick] # Delete his votes - for k in var.VOTES.keys(): + del var.VOTES[nick] # Delete other people's votes on him + for k in list(var.VOTES.keys()): if nick in var.VOTES[k]: var.VOTES[k].remove(nick) + if not var.VOTES[k]: # no more votes on that guy + del var.VOTES[k] + break # can only vote once + if nick in var.WOUNDED: var.WOUNDED.remove(nick) chk_decision(cli)