Update period display to show '1st', '2nd', '3rd', or 'OT' instead of 'P:1', etc.

This commit is contained in:
ChuckBuilds
2025-04-18 13:26:54 -05:00
parent d3cc087fef
commit 2303f8487f

View File

@@ -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'])