Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/PathsActivity.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-03-22 18:38:19 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-03-22 18:38:19 (GMT)
commitdd8986ff4d5c50c5ed0b1e6394e5a05be5f7f3a3 (patch)
tree638616cd3af5801bce1762088b60b82b9251e514 /PathsActivity.py
parent31734ed07eb99f31a07c0b7cbf0ad8375fbe5d74 (diff)
remove robot hand from metadata if robot not in use
Diffstat (limited to 'PathsActivity.py')
-rw-r--r--PathsActivity.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/PathsActivity.py b/PathsActivity.py
index 2eb1098..5b2af2b 100644
--- a/PathsActivity.py
+++ b/PathsActivity.py
@@ -226,7 +226,8 @@ class PathsActivity(activity.Activity):
self.metadata['hand-0'] = self._game.hands[0].serialize()
if self._game.playing_with_robot:
self.metadata['hand-1'] = self._game.hands[1].serialize()
-
+ elif 'hand-1' in self.metadata:
+ del self.metadata['hand-1']
if self._game.last_spr_moved is not None and \
self._game.grid.spr_to_grid(self._game.last_spr_moved) is not None:
self.metadata['last'] = str(self._game.grid.grid[
@@ -252,10 +253,6 @@ class PathsActivity(activity.Activity):
self._game.deck.index = ROW * COL - self._game.grid.cards_in_grid()
for h in self._game.hands:
self._game.deck.index += (COL - h.cards_in_hand())
- print 'recalculating deck index: %d = %d + ' % (
- self._game.deck.index, ROW * COL - self._game.grid.cards_in_grid())
- for h in self._game.hands:
- print (COL - h.cards_in_hand())
self._game.last_spr_moved = None
if 'last' in self.metadata: