Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-05-24 15:47:27 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-05-24 15:47:27 (GMT)
commite16e2fd614b942d727e14814efaf15640884dd65 (patch)
tree49c2d9855d68e5a403b9fba454c599be4f03d2fc
parent1ee0d96ecebe319e997f5ec64ebe2398fdffc2d3 (diff)
calculate number of taunt cards rather than hardwiring
-rw-r--r--game.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/game.py b/game.py
index 8b8d8fd..0e9bc61 100644
--- a/game.py
+++ b/game.py
@@ -353,13 +353,14 @@ class Game():
return x, y
def _taunt(self, x, y, i):
- self._taunt_cards[(i + 1) % 4].hide()
+ n = len(self._taunt_cards)
+ self._taunt_cards[(i + 1) % n].hide()
if self._clicked:
self._timeout_id = None
return True
else:
- self._taunt_cards[i % 4].move((x, y))
- self._taunt_cards[i % 4].set_layer(LOCO_LAYER)
+ self._taunt_cards[i % n].move((x, y))
+ self._taunt_cards[i % n].set_layer(LOCO_LAYER)
self._timeout_id = gobject.timeout_add(
200, self._taunt, x, y, i + 1)