From e16e2fd614b942d727e14814efaf15640884dd65 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 24 May 2012 15:47:27 +0000 Subject: calculate number of taunt cards rather than hardwiring --- 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) -- cgit v0.9.1