コード例 #1
0
 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)
コード例 #2
0
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())
コード例 #3
0
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)
コード例 #4
0
def VBG(displayFrame, player):
    lib.clearFrame(displayFrame)
    vocabulary_game.setVBGFrame(displayFrame, player)
コード例 #5
0
def ROG(displayFrame, player):
    lib.clearFrame(displayFrame)
    reorganize_word.setROGFrame(displayFrame, player)
コード例 #6
0
def WGG(displayFrame, player):
    lib.clearFrame(displayFrame)
    word_Gussing.setWGGFrame(displayFrame, player)