当前位置: 首页>>代码示例>>Python>>正文


Python Trainer.starting_pokemon_object方法代码示例

本文整理汇总了Python中trainer.Trainer.starting_pokemon_object方法的典型用法代码示例。如果您正苦于以下问题:Python Trainer.starting_pokemon_object方法的具体用法?Python Trainer.starting_pokemon_object怎么用?Python Trainer.starting_pokemon_object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在trainer.Trainer的用法示例。


在下文中一共展示了Trainer.starting_pokemon_object方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: input

# 需要导入模块: from trainer import Trainer [as 别名]
# 或者: from trainer.Trainer import starting_pokemon_object [as 别名]
age = input("And.. How old are you?\n")
while True:
    try:
        player.age = int(age)
        break
    except ValueError:
        age = input("Please, give me a number!\n")
gender = input("I see not well, so please, tell me! What is your gender?\n[female/male]\n")
while gender not in player.gender:
    gender = input("Please, select an available!\n")
player.gender = gender
starting_pokemon_object = input("I can offer one pokemon from below.\n[Charizard/Squirtle/Bulbasaur]\n")
while starting_pokemon_object not in Trainer.available_pokemon_names:
    starting_pokemon_object = input("Please, select an available!\n")
if starting_pokemon_object == 'Charizard':
    player.starting_pokemon_object = ch
elif starting_pokemon_object == 'Squirtle':
    player.starting_pokemon_object = sq
elif starting_pokemon_object == 'Bulbasaur':
    player.starting_pokemon_object = bs
player.pokemons_objects.append(player.starting_pokemon_object)
print(player)
input("[Any button to skip]")
print("\nNow the whole world is yours!\nAll pokemons waitng for you!\nGotta catch'em all! ;)")
input("[Any button to skip]\n")

"""
Finally, the game, and the menu loop.
"""

"""
开发者ID:matolaypal,项目名称:poke-hunter,代码行数:33,代码来源:main.py


注:本文中的trainer.Trainer.starting_pokemon_object方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。