summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2014-09-19 17:46:28 +1000
committerPeter Ward <peteraward@gmail.com>2014-09-19 17:46:28 +1000
commita8f546c55b80d05b251c055ef57caab8b0b0a2d7 (patch)
tree832c9fe21f6030ffdf1d50a070ccf48b5af52daa
parent96df12ddb31d086f9290fed824639c668f0455a0 (diff)
fix victory by combat
-rw-r--r--robots/game.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/robots/game.py b/robots/game.py
index 893f147..9160245 100644
--- a/robots/game.py
+++ b/robots/game.py
@@ -82,11 +82,10 @@ class Game:
if robots:
roboteers.append(name)
- if self.victory_by_combat:
- won = bool(winners)
- if len(roboteers) <= 1:
- won = True
- winners.extend(roboteers)
+ won = bool(winners)
+ if len(roboteers) <= 1 and self.victory_by_combat:
+ won = True
+ winners.extend(roboteers)
return winners or won