Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-06-18 16:46:02 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-06-18 16:46:02 (GMT)
commit4681d1514eec09145dc480dbef7ecd285914f26d (patch)
treeee41665af4efc77e2a3fe77ccf87442aeaf06258
parente4876558ad84db8431f9eece6b0673ab218b05fe (diff)
fix answers order in a1g4
-rw-r--r--src/game/Area1Game4.py44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/game/Area1Game4.py b/src/game/Area1Game4.py
index effd431..f3f7554 100644
--- a/src/game/Area1Game4.py
+++ b/src/game/Area1Game4.py
@@ -146,25 +146,33 @@ class CArea1Game4(CGameState):
answer = 5
if not(answer == -1):
- n = self.mQuestionsL.index(answer)
- print self.mQuestionsL
- print n
- print self.mCurrentQuestion
- if (self.mCurrentQuestion == n):
- b = self.mButtonList[answer]
- b.mclicked = False
- CGame().removeChild(b)
-
- self.mGood = self.mGood + 1
- self.mPoints.set_goods(self.mGood)
- else:
- self.mBad = self.mBad + 1
- self.mPoints.set_bads(self.mBad)
- print 'le erro'
-
- self.mCurrentQuestion = self.mCurrentQuestion + 1
+ n = -1
if self.mCurrentQuestion < 6:
- self.mLabelQuestion.set_text(self.mQuestions[self.mCurrentQuestion][0])
+ n = self.mQuestionsL[self.mCurrentQuestion]
+ """print 'current question', self.mCurrentQuestion
+ print self.mQuestionsL
+ print 'n', n
+ print 'answer', answer"""
+ if (answer == n):
+ b = self.mButtonList[answer]
+ b.mclicked = False
+ CGame().removeChild(b)
+
+ self.mGood = self.mGood + 1
+ self.mPoints.set_goods(self.mGood)
+ else:
+ self.mBad = self.mBad + 1
+ self.mPoints.set_bads(self.mBad)
+
+
+ self.mCurrentQuestion = self.mCurrentQuestion + 1
+ if not(self.mCurrentQuestion == 6):
+ self.mLabelQuestion.set_text(self.mQuestions[self.mQuestionsL[self.mCurrentQuestion]][0])
+ else:
+ CGame().removeChild(self.mLabelQuestion)
+ print 'ultima'
+ else:
+ print 'fin preguntas'