本文整理汇总了Python中fight.Fight.encounter方法的典型用法代码示例。如果您正苦于以下问题:Python Fight.encounter方法的具体用法?Python Fight.encounter怎么用?Python Fight.encounter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fight.Fight
的用法示例。
在下文中一共展示了Fight.encounter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Game
# 需要导入模块: from fight import Fight [as 别名]
# 或者: from fight.Fight import encounter [as 别名]
game = Game(player)
fight = Fight(player, game)
help = Help()
shop = Shop(player, game)
print(chr(27) + "[2J")
red("\nWelcome, %s" % player_name)
while True:
game.info()
choice = input()
print()
print(chr(27) + "[2J")
print()
if choice == '1':
if (player.walk() == 1):
fight.encounter()
elif choice == '2':
player.rest()
elif choice == '3':
shop.display()
continue
elif choice == '4':
game.quit()
elif choice == 'H':
help.display()
continue
else:
print("Invalid Choice")
continue
game.advance_day()