Skip to content

Add the Novice Locksmith level - #127

Merged
utilForever merged 3 commits into
mainfrom
novice-locksmith
Aug 23, 2026
Merged

Add the Novice Locksmith level#127
utilForever merged 3 commits into
mainfrom
novice-locksmith

Conversation

@utilForever

@utilForever utilForever commented Aug 23, 2026

Copy link
Copy Markdown
Owner

This revision includes:

  • Add the Novice Locksmith level (Closes Add the Novice Locksmith level #112)
    • Add Novice Locksmith level
    • Add sprites for Novice Locksmith level
    • Expose Novice Locksmith objects in editor

Summary by CodeRabbit

  • New Features

    • Added the Novice Locksmith level, including terrain, structures, and object placement.
    • Added fruit and tree sprites for improved level visuals.
  • Bug Fixes

    • Corrected object display mapping so fruit and tree elements render with the appropriate graphics.
  • Tests

    • Added coverage for level layout, reset behavior, solution completion, key removal, door placement, and sprite palettes.

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

coderabbitai Bot commented Aug 23, 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: 978d3bac-b497-421a-86aa-7433c8b89da6

📥 Commits

Reviewing files that changed from the base of the PR and between c76c6b4 and 0fe9db4.

⛔ Files ignored due to path filters (2)
  • Extensions/BabaGUI/sprites/icon/FRUIT.gif is excluded by !**/*.gif
  • Extensions/BabaGUI/sprites/icon/TREE.gif is excluded by !**/*.gif
📒 Files selected for processing (5)
  • Extensions/BabaGUI/main.py
  • Resources/Maps/novice_locksmith.txt
  • Tests/PythonTests/test_game.py
  • Tests/PythonTests/test_gui.py
  • 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. (16)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: 🍎 Build - macOS 15.7.4 + Xcode 16.4
  • GitHub Check: 🍎 Build - macOS 26.3 + Xcode 26.3
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-13
  • GitHub Check: 🪟 Build - Windows Server 2022 + Visual Studio 2022
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-14
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-18
  • GitHub Check: 🍎 Build - macOS 26.3 + gcc-15
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-12
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-16
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-14
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + clang-17
  • GitHub Check: 🐧 Build - Ubuntu 24.04 + gcc-13
  • GitHub Check: 🪟 Build - Windows Server 2025 + Visual Studio 2026
  • GitHub Check: 🧪 Code Coverage - Codecov (Ubuntu 24.04 + gcc-14, ubuntu-24.04, gcc, 14)
  • GitHub Check: 🌞 Static Analysis - SonarCloud (Ubuntu 24.04 + gcc-14, ubuntu-24.04, gcc, 14)
🧰 Additional context used
📓 Path-based instructions (5)
**/*

📄 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/BabaGUI/main.py
  • Tests/PythonTests/test_game.py
  • Tests/UnitTests/GameTests.cpp
  • Tests/PythonTests/test_gui.py
  • Resources/Maps/novice_locksmith.txt
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_game.py
  • Tests/PythonTests/test_gui.py
**/*.{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:

  • Tests/UnitTests/GameTests.cpp
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/GameTests.cpp
Resources/Maps/**/*

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • Resources/Maps/novice_locksmith.txt
🔇 Additional comments (6)
Resources/Maps/novice_locksmith.txt (1)

1-34: LGTM!

Extensions/BabaGUI/main.py (1)

17-25: LGTM!

Tests/UnitTests/GameTests.cpp (2)

478-497: LGTM!

Also applies to: 499-510


478-510: 🎯 Functional Correctness

Run the focused C++ and Python tests before completion.

The new tests cover map loading, reset behavior, the solution path, and Python API behavior. Build the extension in place before running pytest, then run the relevant doctest cases and Python tests.

As per coding guidelines, run relevant tests before considering behavior changes complete; code and API changes require verification; build the extension in place before running pytest.

Source: Coding guidelines

Tests/PythonTests/test_game.py (1)

222-229: LGTM!

Tests/PythonTests/test_gui.py (1)

112-113: 🗄️ Data Integrity & Integration

Verify the referenced GIF assets are committed.

The test reads Extensions/BabaGUI/sprites/icon/FRUIT.gif and Extensions/BabaGUI/sprites/icon/TREE.gif. If either file is absent or has a different 24x24, three-frame palette layout, the test fails before validating the sprite.


📝 Walkthrough

Walkthrough

The PR adds the Novice Locksmith map, sprite mappings for fruit and tree objects, and Python and C++ tests for loading, resetting, rendering coverage, and completing the level.

Changes

Novice Locksmith level

Layer / File(s) Summary
Level resource and rendering mappings
Resources/Maps/novice_locksmith.txt, Extensions/BabaGUI/main.py
The map resource defines the Novice Locksmith layout and numeric tile data. The GUI resolves fruit and tree objects to their sprite names.
Level loading and solution validation
Tests/UnitTests/GameTests.cpp, Tests/PythonTests/test_game.py, Tests/PythonTests/test_gui.py
C++ and Python tests validate map loading, dimensions, object positions, reset behavior, the prescribed solution path, win state, consumed keys, remaining doors, and fruit and tree palette entries.

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

Merge Risk: ⚪ Minimal · up to 0fe9d

This PR adds a localized level, map, editor exposure, and sprite assets; no actionable merge-blocking risk remains beyond normal checks.

Poem

A rabbit hops across the map,
Fruit and trees now show their sap.
Keys are used, the doors align,
Tests confirm the level’s design.
“Hop, hop!” says Bunny. “All is fine!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The map, sprite mappings, and deterministic C++/Python tests are present, but GIF sprite contents were excluded and rendering cannot be fully verified. Review FRUIT.gif and TREE.gif, then confirm the level renders with the intended sprites and existing suites pass.
✅ 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 and concisely identifies the primary change: adding the Novice Locksmith level.
Out of Scope Changes check ✅ Passed All reviewed changes directly support the Novice Locksmith level, its required sprites, and its regression tests.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ 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 novice-locksmith

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

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.26%. Comparing base (c76c6b4) to head (0fe9db4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   97.26%   97.26%           
=======================================
  Files           7        7           
  Lines        1352     1352           
=======================================
  Hits         1315     1315           
  Misses         37       37           
🚀 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 230f28e into main Aug 23, 2026
24 checks passed
@utilForever
utilForever deleted the novice-locksmith branch August 23, 2026 11:07
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 the Novice Locksmith level

1 participant