[gcompris/gcomprisbraille] Progression in Braille Fun improved



commit 3a6d5e9c30e0b671a95a5f535cde84a0c855c28c
Author: SrishAkaTux <srishakatux gmail com>
Date:   Sun Aug 28 17:39:26 2011 +0530

    Progression in Braille Fun improved

 src/braille_fun-activity/braille_fun.py |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/braille_fun-activity/braille_fun.py b/src/braille_fun-activity/braille_fun.py
index 02d2d83..af1e5fc 100644
--- a/src/braille_fun-activity/braille_fun.py
+++ b/src/braille_fun-activity/braille_fun.py
@@ -81,8 +81,6 @@ class Gcompris_braille_fun:
     gcompris.bar_set_level(self.gcomprisBoard)
 
     #REPEAT ICON
-    pixmap = gcompris.utils.load_svg("braille_alphabets/target.svg")
-    gcompris.bar_set_repeat_icon(pixmap)
     gcompris.bar_set(gcompris.BAR_LEVEL|gcompris.BAR_REPEAT_ICON)
     gcompris.bar_location(300,-1,0.7)
 
@@ -130,8 +128,19 @@ class Gcompris_braille_fun:
                            goocanvas.ANIMATE_FREEZE)
 
       for index in range (level) :
-           #Select a random letter and append it to self.letter_array
-           letter = random.choice(string.letters)
+      	   #Select a random letter and append it to self.letter_array
+           if (level == 1):
+                #Letters from A to J
+           	letter = random.choice(string.letters[random.randint(0,9)])
+           elif(level == 2):
+           	#Letters from K to T
+           	letter = random.choice(string.letters[random.randint(10,18)])
+           elif(level == 3):
+           	#Letters from U to Z
+           	letter = random.choice(string.letters[random.randint(19,25)])
+           else :
+           	letter = random.choice(string.letters[random.randint(0,25)])
+           	
            self.letter_array.append(letter.upper())
            self.animateString = "".join(self.letter_array)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]