From c62b0ca8f1cd9835197490a97686fecf2a4ebc77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20Schr=C3=B6der?=
 <fschroeder@techfak.uni-bielefeld.de>
Date: Wed, 13 Mar 2024 10:25:16 +0100
Subject: [PATCH] Refactor config dictionary references in drawing.py

The reference to the config dictionary has been refactored for better organization in the drawing.py file. Previously, key-value pairs were directly accessed from the config dictionary, now they are accessed from a nested dictionary under the "Gui" key. This change aims to improve code clarity and manageability.
---
 cooperative_cuisine/pygame_2d_vis/drawing.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/cooperative_cuisine/pygame_2d_vis/drawing.py b/cooperative_cuisine/pygame_2d_vis/drawing.py
index 0bdd50c3..1e79d38e 100644
--- a/cooperative_cuisine/pygame_2d_vis/drawing.py
+++ b/cooperative_cuisine/pygame_2d_vis/drawing.py
@@ -83,18 +83,18 @@ class Visualizer:
         self.observation_screen = None
 
         self.USE_PLAYER_COOK_SPRITES = (
-            config["use_player_cook_sprites"]
-            if "use_player_cook_sprites" in config
+            config["Gui"]["use_player_cook_sprites"]
+            if "Gui" in config and "use_player_cook_sprites" in config["Gui"]
             else True
         )
         self.SHOW_INTERACTION_RANGE = (
-            config["show_interaction_range"]
-            if "show_interaction_range" in config
+            config["Gui"]["show_interaction_range"]
+            if "Gui" in config and "show_interaction_range" in config["Gui"]
             else False
         )
         self.SHOW_COUNTER_CENTERS = (
-            config["show_counter_centers"]
-            if "show_counter_centers" in config
+            config["Gui"]["show_counter_centers"]
+            if "Gui" in config and "show_counter_centers" in config["Gui"]
             else False
         )
 
-- 
GitLab