Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2012-08-07 04:33:50 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2012-08-07 04:33:50 (GMT)
commit463a66b42de1b8cf126fe094fb1ff1d13a90e4f4 (patch)
tree5ee6ea1b4d173096fa90a4a3ceec5aebc528eb30
parent6d914e83a6c94cffc0a435f38804644accc8f67b (diff)
parent23e94c477aac4e90e7601ce9cc84e1b5098b7458 (diff)
Merge branch 'master' of git.sugarlabs.org:nutrition/nutrition
-rw-r--r--game.py8
-rw-r--r--images/avena.pngbin171887 -> 219954 bytes
-rw-r--r--images/correct.pngbin305011 -> 41806 bytes
-rw-r--r--images/semillas-de-jicaro.pngbin237741 -> 183699 bytes
-rw-r--r--images/wrong.pngbin294587 -> 42162 bytes
5 files changed, 8 insertions, 0 deletions
diff --git a/game.py b/game.py
index ad8650d..47b2e64 100644
--- a/game.py
+++ b/game.py
@@ -67,6 +67,7 @@ class Game():
self._group_cards = []
self._quantity_cards = []
self._balance_cards = []
+ self._last_twenty = []
self._background = None
# Generate the sprites we'll need...
@@ -242,6 +243,13 @@ class Game():
# Choose a random food image from the list and show it.
self._target = self.food_cards[
word_list[int(uniform(0, NCARDS))]].type
+ while self._target in self._last_twenty:
+ self._target = self.food_cards[
+ word_list[int(uniform(0, NCARDS))]].type
+ self._last_twenty.append(self._target)
+ if len(self._last_twenty) > 20:
+ self._last_twenty.remove(self._last_twenty[0])
+
self._picture_cards[self._target].set_layer(100)
def _name_that_food_group(self):
diff --git a/images/avena.png b/images/avena.png
index 1585dd2..adec08f 100644
--- a/images/avena.png
+++ b/images/avena.png
Binary files differ
diff --git a/images/correct.png b/images/correct.png
index 86bb1f2..95f5d5d 100644
--- a/images/correct.png
+++ b/images/correct.png
Binary files differ
diff --git a/images/semillas-de-jicaro.png b/images/semillas-de-jicaro.png
index 5160d41..4642958 100644
--- a/images/semillas-de-jicaro.png
+++ b/images/semillas-de-jicaro.png
Binary files differ
diff --git a/images/wrong.png b/images/wrong.png
index f184dd1..63084d4 100644
--- a/images/wrong.png
+++ b/images/wrong.png
Binary files differ