Esempio n. 1
0
 def __init__(self, player):
     super(RootMenu, self).__init__(player)
     if self.player.core.DEBUG:
         Term.debugmode()
         
     self.player.MenuList['AttackWho'] = AttackWho(self.player, self)
     self.choiceList = {'1':self.attack, '2':self.next, '3':self.agriculture, '4':self.information, '5':self.train, '6':self.market,'quit':self.quit }
     self.status = StatusList(self.player)
     self.menu = Selection(self.player)
     Term.clear()
Esempio n. 2
0
 def eval(self):
     self.status.StatusPrompt()
     self.prompt = Term.format('\n\n[cg1[cc: Attack \n[cg2[cc: Wait\n[cg3[cc: Improve Agriculture\n[cg4[cc: Information\n[cg5[cc: Train\n')
     choice = super(RootMenu, self).eval(self.choiceList, self.prompt)
     Term.clear()
     if choice is not False:
         choice()
     else:
         Term.clear()
         self.eval()
Esempio n. 3
0
 def StatusPrompt(self):
     self.update()
     Term.clear()
     status    = "Territory:[cb {0} [cc\n\nAgriculture:[cb {1} [cc\n".format(self.location.name, str(self.location.agriculture))
     
     generals = 0
     for i in range(self.location.generals.__len__()):
         if self.location.generals[i].checkLoyalty(self.player):
             generals += 1
     status += "Loyalty: [cb{0} [ccGenerals: [cb{1}[cc\n".format(str(self.location.loyalty), str(generals))
     
     status += "Population: [cb{0}[cc Market: [cb{1}[cc\n".format(str(self.location.population), str(self.location.market))
     
     Term.fprint(status)
     return