Co-authored-by: Paul Trowbridge <fleetside72@users.noreply.github.com>
This commit is contained in:
parent
b46f309396
commit
dbf1124ff9
@ -17,14 +17,24 @@ def save_player_data(player_name, character_name, data):
|
||||
file.write(line + '\n')
|
||||
|
||||
def create_new_character(player_name):
|
||||
#------------------------- game basics ----------------------------------
|
||||
character_name = input("Enter character name: ")
|
||||
gamer_tag = input("Please enter your gamer tag: ")
|
||||
answer = input(f"So your gamer tag is {gamer_tag}? (yes/no) ")
|
||||
while answer.lower() not in ['yes', 'no']:
|
||||
print("Sorry, I only accept 'yes' or 'no' as an answer.")
|
||||
answer = input("Please enter 'yes' or 'no': ")
|
||||
if answer.lower() == 'no':
|
||||
|
||||
#-------------------- get feedback on gamer tag---------------------------
|
||||
while True:
|
||||
gamer_tag = input("Please enter your gamer tag: ")
|
||||
answer = input(f"Is '{gamer_tag}' your gamer tag? (yes/no): ").lower()
|
||||
if answer.startswith('y'):
|
||||
print("Gamer tag verified.")
|
||||
break
|
||||
elif answer.startswith('n'):
|
||||
print("Please re-enter your gamer tag.")
|
||||
else:
|
||||
print("Sorry, response must be yes or no.")
|
||||
|
||||
#---------------------- proceed with game ---------------------------------
|
||||
print(f"Hello {gamer_tag}")
|
||||
player_race = input("Are you a human, dwarf, or elf? (human/dwarf/elf): ").lower()
|
||||
player_category = input(f"Is your {player_race} a ranged {player_race} or a close combat {player_race}? (ranged/close combat): ").lower()
|
||||
@ -51,6 +61,7 @@ def main():
|
||||
save_player_data(player_name, f"character_{i + 1}", character_data)
|
||||
# Continue with your story or additional code here
|
||||
print("You wake up on a shore not remebering anything")
|
||||
player_option1 = input("You see a small hut with the smell of food making you start to feel hungery. Or their is a nearby cave that might have food. What do you do? (walk over/go to cave)")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user