This commit is contained in:
nickwalton
2019-10-30 18:05:10 -06:00
parent 55cc9d55c6
commit 2613bdbcb3
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -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)
+2
View File
@@ -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