五千年(敝帚自珍)

主题:【整理】金秋盛会 -- 神仙驴

共:💬5002 🌺46001 🌵605
全看分页树展 · 主题 跟帖
家园 气着气着就气笑了 -- 有补充
class Gov:
 myGovLevel = 0
 taskGood = 0
 MAXGOVLEVEL=10
 def __init__(self,taskGood,yourGovLevel):
 self.taskGood = taskGood
 self.myGovLevel = yourGovLevel
 
 print(f"Task Received at gov level {self.myGovLevel}. ",end = "")
 def passWok(self):
 wokReceiverGovLevel = self.myGovLevel + 1
 print(f"Task assigned to gov level {wokReceiverGovLevel}, anything goes wrong, blame them.")
 Gov(self.taskGood, wokReceiverGovLevel).work()
 
 def takeCredit(self):
 print(f'Me being Gov Level {self.myGovLevel}, Me Awesome!')
 
 def bottomLevel(self):
 print("Me Fooked")
 
 def work(self):
 if self.taskGood == 0 and self.myGovLevel == Gov.MAXGOVLEVEL:
 self.bottomLevel()
 return
 if self.taskGood == 0:
 self.passWok()
 elif self.taskGood == 1:
 self.takeCredit()
Gov(0,0).work()
通宝推:卡路里,不如安静,方平,
作者 对本帖的 补充(1)
家园 河对py不友善哈 -- 补充帖
全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河