From 2613bdbcb3cb9796c7c74c32695bab408f19da30 Mon Sep 17 00:00:00 2001 From: nickwalton Date: Wed, 30 Oct 2019 18:05:10 -0600 Subject: [PATCH] update --- console_play.py | 7 +++++-- story/story_manager.py | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/console_play.py b/console_play.py index aff558f..b045d9c 100644 --- a/console_play.py +++ b/console_play.py @@ -35,8 +35,11 @@ def play_unconstrained(): while(action == ""): action = input("> ") - action = " You " + action + ". " - action = first_to_second_person(action) + if action = "": + action = None + else: + 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 72f5bf0..84f7136 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -96,6 +96,8 @@ 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