def fire_or_not(self):
     if not self.could_fire():
         return
     print ''
     print u'你可以解雇让你不爽的员工'
     if keyboard.confirm():
         self.fire()
Beispiel #2
0
 def fire_or_not(self):
     if not self.could_fire():
         return
     print ''
     print u'你可以解雇让你不爽的员工'
     if keyboard.confirm():
         self.fire()
 def hire_or_not(self):
     if not self.could_hire():
         return
     print ''
     print u'你有空余的工位, 你需要招募员工么'
     if keyboard.confirm():
         self.hire()
Beispiel #4
0
 def hire_or_not(self):
     if not self.could_hire():
         return
     print ''
     print u'你有空余的工位, 你需要招募员工么'
     if keyboard.confirm():
         self.hire()
Beispiel #5
0
 def _hire(self):
     coder = self.avaliable_coders[randint(0, len(self.avaliable_coders)-1)]
     print '------'
     print u"%s: %s 薪水: %s"%(coder.job, coder.name, coder.salary)
     if keyboard.confirm():
         self.coders.append(coder)
         self.avaliable_coders.remove(coder)
         print u"%s加入了你的团队。"%(coder.name)
Beispiel #6
0
 def fire(self):
     if not self.could_fire():
         return
     for coder in self.coders:
         if not self.could_fire():
             return
         print '--------'
         print u"%s: %s 薪水: %s"%(coder.job, coder.name, coder.salary)
         if keyboard.confirm():
             self.coders.pop(self.coders.index(coder))
             print u"%s退出了你的团队。"%(coder.name)
         if len(self.coders) < self.min_coders:
             print u'你至少需要%s名员工加入你的团队!' %(self.min_coders)
             self.hire()
             return
 def hire(self):
     if not self.could_hire():
         return
     print u"你可以最多可以雇佣%s名员工,请谨慎选择:" %(self.max_coders)
     keyboard.next()
     for coder in self.avaliable_coders:
         if not self.could_hire():
             return
         print '------'
         print u"%s: %s 薪水: %s"%(coder.job, coder.name, coder.salary)
         if keyboard.confirm():
             self.coders.append(coder)
             print u"%s加入了你的团队。"%(coder.name)
         if self.coders < self.min_coders:
             print u'你至少需要%s名员工加入你的团队!' %(self.min_coders)
             self.hire()
             return
 def hire(self):
     if not self.could_hire():
         return
     print u"你可以最多可以雇佣%s名员工,请谨慎选择:" % (self.max_coders)
     keyboard.next()
     for coder in self.avaliable_coders:
         if not self.could_hire():
             return
         print '------'
         print u"%s: %s 薪水: %s" % (coder.job, coder.name, coder.salary)
         if keyboard.confirm():
             self.coders.append(coder)
             print u"%s加入了你的团队。" % (coder.name)
         if self.coders < self.min_coders:
             print u'你至少需要%s名员工加入你的团队!' % (self.min_coders)
             self.hire()
             return
Beispiel #9
0
    def hire(self):
        print u"你可以最多可以雇佣%s名员工,请谨慎选择:" %(self.max_coders)
        keyboard.next()

        #: if has coder could hire
        if not self.could_hire():
            return

        #: if coder is too little
        while len(self.coders) < self.min_coders:
            print u'你至少需要%s名员工加入你的团队!' %(self.min_coders)
            self._hire()

        #: if exit hire
        while len(self.coders) < self.max_coders:
            print "------------------"
            print "当前雇佣程序员人数 %s" %len(self.coders)
            print "------------------"
            print u"是否结束雇佣,确认按 Y"
            if keyboard.confirm():
                break
            else:
                self._hire()