本文整理汇总了Python中UI.acknowledge方法的典型用法代码示例。如果您正苦于以下问题:Python UI.acknowledge方法的具体用法?Python UI.acknowledge怎么用?Python UI.acknowledge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI.acknowledge方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: end_turn
# 需要导入模块: import UI [as 别名]
# 或者: from UI import acknowledge [as 别名]
def end_turn(s):
for quest in quest_list:
quest.apply_work(s)
if quest.succeed():
quest.victory(s)
quest_list.remove(quest)
else:
quest.failure(s)
if random.random() > 0.7:
new_quest = Initial.get_random_quest()
new_quest.set_cost(s)
UI.acknowledge()
print new_quest.intro
quest_list.append(new_quest)
s.pass_turn()
UI.acknowledge()
示例2: decision_loop
# 需要导入模块: import UI [as 别名]
# 或者: from UI import acknowledge [as 别名]
def decision_loop(s):
main_loop = ["Inspect Crew", "Choose Research", "Assign Job", "Sterilize", "Euthanize", "End Turn"]
quest_status = ""
for quest in quest_list:
quest_status+="\n"+quest.description+", projected work: "+str(quest.count_work(s))+"/"+str(quest.cost)
answer = UI.list_options(main_loop, header=str(UI.get_stats(s)+quest_status))
if answer == 0:
inspect_crew(s)
elif answer == 1:
choose_research(s)
elif answer == 2:
assign_job(s)
elif answer == 3:
sterilize(s)
elif answer == 4:
euthanize(s)
elif answer == 5:
end_turn(s)
UI.acknowledge()