From a17a68a07eab2ea4eceef2790f9497e61bd04371 Mon Sep 17 00:00:00 2001 From: James Campbell Date: Sat, 1 Aug 2026 12:34:46 -0400 Subject: [PATCH] Code cleanup --- game/level.py | 2 -- game/player.py | 3 --- game/settings.py | 1 - game/traps.py | 2 -- 4 files changed, 8 deletions(-) diff --git a/game/level.py b/game/level.py index 9b92d9e..6304498 100644 --- a/game/level.py +++ b/game/level.py @@ -39,8 +39,6 @@ class Level: rows = data.get("map", "").splitlines() # Strip a leading blank line from block-scalar formatting, keep shape. - rows = [r for r in rows if r.strip("\n") != "" or True] - rows = [r.rstrip("\n") for r in rows] if rows and rows[0] == "": rows = rows[1:] diff --git a/game/player.py b/game/player.py index 4aef5f1..c479a0e 100644 --- a/game/player.py +++ b/game/player.py @@ -42,7 +42,6 @@ class Player: self.drop_through_timer = 0.0 self.was_jump_held = False self.crushed = False - self.carry = (0.0, 0.0) self._sync_rect() def _sync_rect(self): @@ -141,7 +140,6 @@ class Player: def _ride_platforms(self): # If standing on a moving platform, inherit its motion this frame. - self.carry = (0.0, 0.0) for rect, dx, dy in self.level.carriers(): if ( abs(self.rect.bottom - rect.top) <= 3 @@ -151,7 +149,6 @@ class Player: self.fx += dx self.fy += dy self._sync_rect() - self.carry = (dx, dy) break def _horizontal(self, dt, inp): diff --git a/game/settings.py b/game/settings.py index 7617d31..11b5f9e 100644 --- a/game/settings.py +++ b/game/settings.py @@ -32,7 +32,6 @@ FADE_TIME = 0.3 # seconds for each half of the fade-to-black transition # --- Colors (placeholder rendering) ------------------------------------------ COLOR_BG = (24, 26, 38) COLOR_HUD = (235, 235, 245) -COLOR_HUD_WARN = (240, 90, 90) # Fallback colors + labels for placeholder rectangles, keyed by sprite name. PLACEHOLDERS = { diff --git a/game/traps.py b/game/traps.py index cf8633b..b9d851b 100644 --- a/game/traps.py +++ b/game/traps.py @@ -15,8 +15,6 @@ Nothing else in the engine needs to change. import pygame -from . import settings - # --- helpers ----------------------------------------------------------------- _DIRS = { "up": (0, -1),