Example #1
0
 def rollupdate(self):
     global mydice
     mydice = [0, 0, 0, 0, 0]
     mydice = mf.roll()
     self.bestmove.set(mf.bestplays(mydice))
     print "{}".format(self.bestmove)
     self.dice1_count = mydice[0]
     self.dice1.set(self.dice1_count)
     self.dice2_count = mydice[1]
     self.dice2.set(self.dice2_count)
     self.dice3_count = mydice[2]
     self.dice3.set(self.dice3_count)
     self.dice4_count = mydice[3]
     self.dice4.set(self.dice4_count)
     self.dice5_count = mydice[4]
     self.dice5.set(self.dice5_count)
Example #2
0
 def rollupdate(self):
     global mydice
     mydice = [0, 0, 0, 0, 0]
     mydice = mf.roll()
     self.dice1_count = mydice[0]
     self.dice1.set(self.dice1_count)
     self.dice2_count = mydice[1]
     self.dice2.set(self.dice2_count)
     self.dice3_count = mydice[2]
     self.dice3.set(self.dice3_count)
     self.dice4_count = mydice[3]
     self.dice4.set(self.dice4_count)
     self.dice5_count = mydice[4]
     self.dice5.set(self.dice5_count)
Example #3
0
 def updateyahtzee(self):
     self.yahtzeecount = mf.yahtzee(mydice)
     self.yahtzee.set(self.yahtzeecount)
     self.totalscore.set(self.onescount + self.twoscount + self.threescount + self.fourscount + self.fivescount + self.sixescount + self.threeofakindcount + self.fourofakindcount + self.fullhousecount + self.smallstraightcount + self.largestraightcount + self.chancecount + self.yahtzeecount)