From 16f4d1694c45993340faf209582136d90fb0a6f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:00:05 +0000 Subject: [PATCH 1/2] Initial plan From ffb852e5f1a6e45d4bacdd1d7e449e489a23b851 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:02:22 +0000 Subject: [PATCH 2/2] Define GRASS_PATTERN_WIDTH constant to replace magic number Co-authored-by: atarukun <6511495+atarukun@users.noreply.github.com> --- badge/apps/jungle/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/badge/apps/jungle/__init__.py b/badge/apps/jungle/__init__.py index 5a0c648..9eed944 100644 --- a/badge/apps/jungle/__init__.py +++ b/badge/apps/jungle/__init__.py @@ -11,6 +11,7 @@ OBSTACLE_SPAWN_MAX = 120 OBSTACLE_REMOVAL_THRESHOLD = -50 # X position at which off-screen obstacles are removed AIR_GAP = 8 # Vertical gap above ground that the branch bottom sits at (duck to clear) +GRASS_PATTERN_WIDTH = 8 # Width of the repeating grass pattern # Collision box adjustments for forgiving gameplay COLLISION_MARGIN = 2 # Pixels reduced from each side of collision boxes @@ -222,8 +223,8 @@ def draw_game(): # Draw grass pattern on ground screen.brush = GRASS_COLOR - for i in range(0, WIDTH, 8): - offset = (state["scroll_offset"] + i) % 8 + for i in range(0, WIDTH, GRASS_PATTERN_WIDTH): + offset = (state["scroll_offset"] + i) % GRASS_PATTERN_WIDTH screen.draw(shapes.rectangle(i - offset, GROUND_Y, 4, 2)) # Draw obstacles