From 56fba2221764d59663924b3e03d9eb18dabceffb Mon Sep 17 00:00:00 2001 From: kansaigaijin Date: Sun, 13 Jul 2025 20:49:41 +1200 Subject: [PATCH] Updated text parsing and commands --- function_list.py | 5 ++--- main.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/function_list.py b/function_list.py index fc5d9f1..ba5a9dc 100644 --- a/function_list.py +++ b/function_list.py @@ -406,9 +406,8 @@ def parse(input_text): command = "take" object1 = " ".join(words[2:]) return command, object1 - elif words[0] == "look" and words[1] == "around" and len(words) > 2: - command = "look" - object1 = " ".join(words[2:]) + elif words[0] == "look" and words[1] == "around" and len(words) == 2: + command = "look_around" return command, object1 # Single-word commands diff --git a/main.py b/main.py index ddfa680..4b8a487 100644 --- a/main.py +++ b/main.py @@ -296,7 +296,7 @@ def main_game_loop(): get_instructions() elif command == "scene": game_engine.display_current_scene() - elif command == "look": + elif command == "look_around": game_engine.look_around() elif command == "inventory": game_engine.player.inventory.current_inventory()