diff --git a/console_play.py b/console_play.py index b045d9c..496ffc8 100644 --- a/console_play.py +++ b/console_play.py @@ -31,15 +31,12 @@ def play_unconstrained(): print("\n") console_print(str(story_manager.story)) while (True): - action = "" - while(action == ""): - action = input("> ") + action = input("> ") - if action = "": - action = None - else: + if action != "": action = " You " + action + ". " action = first_to_second_person(action) + result = story_manager.act(action) console_print("\n\n" + action + result) diff --git a/story/story_manager.py b/story/story_manager.py index 84f7136..cf008b7 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -96,8 +96,7 @@ class StoryManager(): class UnconstrainedStoryManager(StoryManager): def act(self, action_choice): - if action_choice is None: - action_choice = "" + result = self.generate_result(action_choice) self.story.add_to_story(action_choice, result) return result