Skip to content
Snippets Groups Projects
Commit f30246f3 authored by Minal Khatri's avatar Minal Khatri
Browse files

reset

parent 78555284
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ PAUSE_TIME = 0.75 # seconds
class QuizzerApp(App):
DEFAULT_QUESTION = ('What is your favorite color?', ('Blue', 'Blue', 'Blue', 'Blue'), 'Blue')
QUIZ_LENGTH=5
include_gui_topic = BooleanProperty(True)
include_color_topic = BooleanProperty(False)
include_tree_topic = BooleanProperty(False)
......@@ -121,6 +121,10 @@ class QuizzerApp(App):
self.questions.pop()
if len(self.questions) == 0:
self.reshuffle()
if self.attempts >= QuizzerApp.QUIZ_LENGTH:
self.attempts = 0
self.score = 0
if __name__ == '__main__':
......
......@@ -85,7 +85,7 @@ ScreenManager:
size_hint: (1, None)
size: (self.texture_size[0] + 64, self.texture_size[1] + 64)
ProgressBar:
max: 5
max: app.QUIZ_LENGTH
value: app.attempts
size_hint: (1, None)
height: sp(8)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment