diff --git a/cooperative_cuisine/pygame_2d_vis/gui.py b/cooperative_cuisine/pygame_2d_vis/gui.py index c58c36a230cd21cf3631ba3a5fc212726afd045b..02ee0136b0c66bae1182e7ead65cce0774431872 100644 --- a/cooperative_cuisine/pygame_2d_vis/gui.py +++ b/cooperative_cuisine/pygame_2d_vis/gui.py @@ -3,6 +3,7 @@ import json import logging import os import random +import re import signal import subprocess import sys @@ -1133,7 +1134,9 @@ class PyGameGUI: anchors=anchors, ) - text = f"Player {player} served meal {meal}." + meal = re.sub(r"(?<!^)(?=[A-Z])", " ", meal) + meal = meal.replace("(", "").replace(")", "") + text = f"Player {player} served a {meal}." meal_label = pygame_gui.elements.UILabel( text=text, relative_rect=pygame.Rect( @@ -1345,6 +1348,7 @@ class PyGameGUI: for idx, rg in enumerate(self.level_info["recipe_graphs"]): meal = rg["meal"] + meal = re.sub(r"(?<!^)(?=[A-Z])", " ", meal) positions = np.array(list(rg["layout"].values())) unique_vals = np.unique(positions[:, 1])