Exemple #1
0
 def on_boarding():
     """ creates a player object with user input ,writes to save and starts the location"""
     print(f"hello and welcome to my game!\n What is your name?")
     name = UI.ask("(abc)")
     print(f"Oh your name is {name} and what is your gender?")
     gender = UI.ask("(abc)")
     Player = main_player(name, gender)
     print(f'here is your stats:\n {Player.stats()}')
     print("""Sorry for i was only interseted, it's hard to see.
     Welcome to this wonderful land.""")
     save_info.write(Player,Player.name)
     main.move_to_location(Player)
Exemple #2
0
 def test_inject_ask(self):
     with patch('builtins.input', return_value='hello'):
         r = UI.ask("test")
         self.assertEqual(r, "hello")