def updatetierthree(self): global queue3 global weightedplay if weightedplay: queue3 = brain.selectweightedquestion(10) else: queue3 = brain.selectrandomquestion(10)
def updatetopics(self): global queue global queue2 global queue3 global numtopics queue = brain.tieronequeue(3) queue2 = brain.tiertwoqueue() queue3 = brain.selectrandomquestion(10) numtopics = brain.numtopics()
from kivy.uix.tabbedpanel import TabbedPanelItem from kivy.uix.tabbedpanel import TabbedPanel from kivy.app import App from kivy.uix.button import Button from functools import partial from kivy.uix.textinput import TextInput from kivy.uix.label import Label from time import sleep import threading import brain from math import sqrt from kivy.graphics import Color, Rectangle queue = brain.tieronequeue(3) queue2 = brain.tiertwoqueue() queue3 = brain.selectrandomquestion(10) weightedplay = True numtopics = brain.numtopics() class ReadBox(BoxLayout): """ This class demonstrates various techniques that can be used for binding to events. Although parts could me made more optimal, advanced Python concepts are avoided for the sake of readability and clarity. """ def __init__(self, **kwargs): super(ReadBox, self).__init__(**kwargs) self.orientation = "horizontal" self.readbool = True self.padding = 5