From 2303f8487f46c81eb95b460a7a660e9833a84173 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Fri, 18 Apr 2025 13:26:54 -0500 Subject: [PATCH] Update period display to show '1st', '2nd', '3rd', or 'OT' instead of 'P:1', etc. --- src/nhl_managers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nhl_managers.py b/src/nhl_managers.py index 56cf2962..b0048977 100644 --- a/src/nhl_managers.py +++ b/src/nhl_managers.py @@ -297,7 +297,14 @@ class BaseNHLManager: else: period = self.current_game.get("period", 0) clock = self.current_game.get("clock", "0:00") - status_text = f"P:{period} {clock}" + + # Format period text + if period > 3: + period_text = "OT" + else: + period_text = f"{period}{'st' if period == 1 else 'nd' if period == 2 else 'rd'}" + + status_text = f"{period_text} {clock}" # Calculate position for the status text (centered at the top) status_width = draw.textlength(status_text, font=self.fonts['time'])