def confirmName(): name = nameEntry.get() if name != "": player = Player(name) lib.clearFrame(mainFram) genIndexBtn(player, mainFram) else: lib.setTextLabel(mainFram, art.text2art("NAME!!!", font="block", chr_ignore=True), font=warningWordFont, positionCfg=warningPositionCfg) cat.pack_forget() lib.setTextLabel(mainFram, warning, font=warningArtFont, positionCfg=warningPositionCfg)
def fail(header, failCount, scoreCount, player, mainFram): failCount.fail() if failCount.chance4fail <= 0: dbUtil.updateVBG(player.name, scoreCount.score, datetime.now().strftime("%m/%d/%Y")) rows = dbUtil.top10VBG() lib.clearFrame(mainFram) indexFrame.genIndexBtn(player, mainFram) lib.createRanking(rows) else: header.configure(text=failCount.getMsg())
def nextStage(ansFrame, header, failCount, scoreCount, displayScore, player, mainFram, definitionDisplay): possibleAns, ans, definition = getQuestion() definitionDisplay.configure(state='normal') definitionDisplay.delete('1.0', tk.END) definitionDisplay.insert(tk.INSERT, definition) definitionDisplay.configure(state='disabled') scoreCount.nextStage() displayScore.configure(text=scoreCount.getMsg()) lib.clearFrame(ansFrame) genBtn4Ans(ansFrame, possibleAns, ans, header, failCount, scoreCount, displayScore, player, mainFram, definitionDisplay)
def VBG(displayFrame, player): lib.clearFrame(displayFrame) vocabulary_game.setVBGFrame(displayFrame, player)
def ROG(displayFrame, player): lib.clearFrame(displayFrame) reorganize_word.setROGFrame(displayFrame, player)
def WGG(displayFrame, player): lib.clearFrame(displayFrame) word_Gussing.setWGGFrame(displayFrame, player)