[gcompris] braille_fun: now restart the same level uppon loose.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] braille_fun: now restart the same level uppon loose.
- Date: Mon, 5 Sep 2011 22:11:47 +0000 (UTC)
commit 1ab194dc6e82f911701a4829f4c724a42ce259e8
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Tue Sep 6 00:10:11 2011 +0200
braille_fun: now restart the same level uppon loose.
src/braille_fun-activity/braille_fun.py | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/braille_fun-activity/braille_fun.py b/src/braille_fun-activity/braille_fun.py
index d7acecf..584c565 100644
--- a/src/braille_fun-activity/braille_fun.py
+++ b/src/braille_fun-activity/braille_fun.py
@@ -218,12 +218,10 @@ class Gcompris_braille_fun:
# This timer loop is to wait for milliseconds before calling a Bonus API
def timer_loop(self):
- print "timer_loop"
self.gamewon = True
gcompris.bonus.display(gcompris.bonus.WIN,gcompris.bonus.SMILEY)
def animationFinished(self, item, status):
- print "animationFinished"
if (self.counter != self.gcomprisBoard.level) :
self.gamewon = False
gcompris.bonus.display(gcompris.bonus.LOOSE,gcompris.bonus.SMILEY)
@@ -262,13 +260,12 @@ class Gcompris_braille_fun:
if (self.board_paused):
return
- if (not self.board_paused):
- self.reset_level()
- if self.gamewon:
- self.increment_level()
- self.gamewon = False
- self.end()
- self.start()
+ self.reset_level()
+ if self.gamewon:
+ self.increment_level()
+ self.gamewon = False
+ self.end()
+ self.start()
def reset_level(self):
self.letter_array = []
@@ -278,7 +275,6 @@ class Gcompris_braille_fun:
self.counter = 0
def increment_level(self):
- print "increment_level"
self.reset_level()
gcompris.sound.play_ogg("sounds/bleep.wav")
self.gcomprisBoard.sublevel += 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]