Esempio n. 1
0
 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()
Esempio n. 2
0
 def cleartopics(self, obj):
     brain.cleartopics()
     if brain.numtopics() == 0:
         self.evenmore.text = "Successfully cleared all topics. No Going back lmao"
         self.evenmore.text_size = self.evenmore.size
         self.evenmore.font_size = 13
         global numtopics
         numtopics = 0
         self.start()
     else:
         self.evenmore.text = "Failed to clear topics for some dumb reason."
         self.evenmore.text_size = self.evenmore.size
         self.evenmore.font_size = 13
Esempio n. 3
0
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
        # We start with binding to a normal event. The only argument
        # passed to the callback is the object which we have bound to.