From adb8772bffbff465e06c3e7c959f9ff1fa3515e8 Mon Sep 17 00:00:00 2001
From: Jon <vitale.jonathan@ymail.com>
Date: Sun, 4 Jun 2023 14:04:37 +1000
Subject: [PATCH] Add __name__ == __main__ statement

---
 week2/solution/code/vacuum_world.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/week2/solution/code/vacuum_world.py b/week2/solution/code/vacuum_world.py
index 3d9656e..94e83d0 100644
--- a/week2/solution/code/vacuum_world.py
+++ b/week2/solution/code/vacuum_world.py
@@ -1,5 +1,6 @@
 from une_ai.vacuum import VacuumGame, DISPLAY_HEIGHT, DISPLAY_WIDTH
 from agent_programs import simple_reflex_behaviour, model_based_reflex_behaviour, goal_based_reflex_behaviour, utility_based_reflex_behaviour
 
-# To test the different agent programs, change the function passed as parameter to create the instance of VacuumGame
-game = VacuumGame(utility_based_reflex_behaviour, DISPLAY_WIDTH, DISPLAY_HEIGHT)
\ No newline at end of file
+if __name__ == "__main__":
+    # To test the different agent programs, change the function passed as parameter to create the instance of VacuumGame
+    game = VacuumGame(utility_based_reflex_behaviour, DISPLAY_WIDTH, DISPLAY_HEIGHT)
\ No newline at end of file
-- 
GitLab