Skip to content

Add BRICK and the Brick Wall level - #124

Merged
utilForever merged 3 commits into
mainfrom
brick
Aug 19, 2026
Merged

Add BRICK and the Brick Wall level#124
utilForever merged 3 commits into
mainfrom
brick

Conversation

@utilForever

@utilForever utilForever commented Aug 19, 2026

Copy link
Copy Markdown
Owner

This revision includes:

Summary by CodeRabbit

  • New Features
    • Added Brick as a selectable object in the level editor and GUI palette.
    • Added a new Brick Wall level featuring brick-based layouts and a victory puzzle.
  • Bug Fixes
    • Bricks now remain intact when the Brick Wall level is reset or played.
  • Tests
    • Added coverage for level loading, editing, saving, resetting, sprite validation, and completing the new puzzle.

@utilForever utilForever self-assigned this Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f4b7540-1724-4660-8233-24f0b3520faa

📥 Commits

Reviewing files that changed from the base of the PR and between 8758d2e and 56c46e5.

⛔ Files ignored due to path filters (1)
  • Extensions/BabaGUI/sprites/text/BRICK.gif is excluded by !**/*.gif
📒 Files selected for processing (7)
  • Extensions/BabaEditor/LevelEditor.cpp
  • Extensions/BabaGUI/main.py
  • Resources/Maps/brick_wall.txt
  • Tests/PythonTests/test_game.py
  • Tests/PythonTests/test_gui.py
  • Tests/UnitTests/EditorTests.cpp
  • Tests/UnitTests/GameTests.cpp

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: 🍎 Build - macOS 26.3 + Xcode 26.3
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-15
  • GitHub Check: 🍎 Build - macOS 15.7.4 + Xcode 16.4
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-13
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-14
  • GitHub Check: 🌞 Static Analysis - SonarCloud (Ubuntu 24.04 + gcc-14, ubuntu-24.04, gcc, 14)
  • GitHub Check: 🧪 Code Coverage - Codecov (Ubuntu 24.04 + gcc-14, ubuntu-24.04, gcc, 14)
  • GitHub Check: 🪟 Build - Windows Server 2022 + Visual Studio 2022
  • GitHub Check: 🪟 Build - Windows Server 2025 + Visual Studio 2026
  • GitHub Check: 📚 Build Documentation
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-16
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-13
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-14
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-18
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-12
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-17
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{cpp,hpp,h}

📄 CodeRabbit inference engine (AGENTS.md)

Preserve C++17 portability and avoid compiler-specific assumptions unless they are guarded by CMake or clearly isolated.

Files:

  • Extensions/BabaEditor/LevelEditor.cpp
  • Tests/UnitTests/EditorTests.cpp
  • Tests/UnitTests/GameTests.cpp
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Run relevant tests before considering behavior changes complete; code and API changes require verification, while documentation-only changes generally do not require a build.
Keep generated or mirrored updates in the same commit as the source change that requires them.
Use focused commits with conventional prefixes where appropriate, such as feat:, fix:, refactor:, test:, docs:, or chore:.

Files:

  • Extensions/BabaEditor/LevelEditor.cpp
  • Resources/Maps/brick_wall.txt
  • Tests/UnitTests/EditorTests.cpp
  • Tests/UnitTests/GameTests.cpp
  • Extensions/BabaGUI/main.py
  • Tests/PythonTests/test_gui.py
  • Tests/PythonTests/test_game.py
Resources/Maps/**/*

📄 CodeRabbit inference engine (AGENTS.md)

Keep reusable map fixtures small and place them in Resources/Maps/.

Files:

  • Resources/Maps/brick_wall.txt
Tests/UnitTests/**/*.{cpp,hpp,h}

📄 CodeRabbit inference engine (AGENTS.md)

Update or add doctest coverage in Tests/UnitTests/ when C++ simulator behavior changes.

Files:

  • Tests/UnitTests/EditorTests.cpp
  • Tests/UnitTests/GameTests.cpp
Tests/PythonTests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Update Python tests when Python-visible behavior changes, and build the extension in place before running pytest.

Files:

  • Tests/PythonTests/test_gui.py
  • Tests/PythonTests/test_game.py
🔇 Additional comments (7)
Extensions/BabaEditor/LevelEditor.cpp (1)

158-158: LGTM!

Extensions/BabaGUI/main.py (1)

35-35: LGTM!

Tests/PythonTests/test_gui.py (1)

93-93: LGTM!

Resources/Maps/brick_wall.txt (1)

1-9: 🎯 Functional Correctness

Run the focused validation before merge.

This map changes game behavior and GUI-visible content. Build the extension in place. Then run the focused C++ Brick Wall coverage and Tests/PythonTests/test_game.py plus Tests/PythonTests/test_gui.py. Record the results before merge.

As per coding guidelines, “Run relevant tests before considering behavior changes complete,” and “build the extension in place before running pytest.”

Source: Coding guidelines

Tests/UnitTests/EditorTests.cpp (1)

224-260: LGTM!

Tests/PythonTests/test_game.py (1)

491-517: LGTM!

Also applies to: 520-527

Tests/UnitTests/GameTests.cpp (1)

23-23: LGTM!

Also applies to: 368-403


📝 Walkthrough

Walkthrough

The change adds BRICK to the editor and GUI catalogs, introduces the 15×8 Brick Wall map, and adds editor, palette, loading, reset, and gameplay completion tests.

Changes

BRICK and Brick Wall level

Layer / File(s) Summary
BRICK catalog and image integration
Extensions/BabaEditor/LevelEditor.cpp, Extensions/BabaGUI/main.py, Tests/PythonTests/test_gui.py
The editor and GUI recognize BRICK. Palette tests validate the BRICK.gif sprite.
Brick Wall map and editor round trip
Resources/Maps/brick_wall.txt, Tests/UnitTests/EditorTests.cpp
The 15×8 map is added. Editor tests validate map values, save/load equality, cleanup, and required sprite assets.
Brick Wall gameplay coverage
Tests/PythonTests/test_game.py, Tests/UnitTests/GameTests.cpp
Tests validate object placement, reset preservation, formation of BABA IS WIN, and the WON state.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 56c46

This localized feature change is merge-ready after normal checks; no actionable merge-blocking risk remains.

Possibly related PRs

Poem

A rabbit hops where brick walls stand,
BRICK now joins the catalog band.
Maps load clean and reset right,
BABA IS WIN brings sweet delight.
Hop, hop—the level’s won tonight! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The reviewable changes satisfy the linked issue, but the required BRICK.gif sprite is excluded by the !**/*.gif filter and cannot be verified. Verify that Extensions/BabaGUI/sprites/text/BRICK.gif exists and matches the required sprite asset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding BRICK and the Brick Wall level.
Out of Scope Changes check ✅ Passed All reviewed changes support the linked issue by adding BRICK, the Brick Wall map, editor support, and focused tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brick

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.13%. Comparing base (8758d2e) to head (56c46e5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #124   +/-   ##
=======================================
  Coverage   97.13%   97.13%           
=======================================
  Files           7        7           
  Lines        1223     1223           
=======================================
  Hits         1188     1188           
  Misses         35       35           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@utilForever
utilForever merged commit da881d6 into main Aug 19, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add BRICK and the Brick Wall level

1 participant