Fix Tray Return Uncle placement and stat precision - #117
Conversation
- Updated `MainViewModel.onCellClick` to allow `START` and `END` tiles as valid release points for the Tray Return Uncle "last empty space" check. - Added explicit rounding to 1 decimal place for `Range` and `Radius` stats in `StallUpgradeManager.kt` to prevent floating-point precision drift. - Added a regression test `TrayUncleRuleTest.kt` to verify the placement logic. Co-authored-by: candour <4670475+candour@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughMainViewModel placement and enemy-release logic for StallType.TRAY_RETURN_UNCLE now treat adjacent TileType.START and TileType.GOAL_TABLE as acceptable walkable neighbors in addition to TileType.FLOOR. StallUpgradeManager.calculateValue now rounds Range and Radius to one decimal. A unit test (TrayUncleRuleTest) was added to validate placement behavior. ChangesTray-Uncle placement & release
Stall upgrade quantization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0392027c-5c31-4434-9f8f-215b929e6e76
📒 Files selected for processing (3)
app/src/main/java/com/messark/hawker/MainViewModel.ktapp/src/main/java/com/messark/hawker/utils/StallUpgradeManager.ktapp/src/test/java/com/messark/hawker/TrayUncleRuleTest.kt
- Updated `MainViewModel.onCellClick` to allow `START` and `GOAL_TABLE` tiles as valid release points for the Tray Return Uncle "last empty space" check. (Note: `GOAL_TABLE` is the actual target tile used by the map generator). - Updated `MainViewModel.releaseEnemy` to include `START` and `GOAL_TABLE` as valid release points. - Added explicit rounding to 1 decimal place for `Range` and `Radius` stats in `StallUpgradeManager.kt` to prevent floating-point precision drift. - Added a regression test `TrayUncleRuleTest.kt` to verify the placement logic, using `GOAL_TABLE` as the objective. Co-authored-by: candour <4670475+candour@users.noreply.github.com>
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
I fixed two bugs:
FLOORtiles as valid neighbors. I expanded this to includeSTARTandENDtiles, which are also valid release points for the Uncle's displacement mechanic.RangeandRadiuswere accumulating precision errors over multiple upgrades. I added explicit rounding to 1 decimal place to ensure consistency and clean data.I've also added a new unit test
TrayUncleRuleTest.ktto verify the fix for the Tray Return Uncle placement rule.PR created automatically by Jules for task 1761859171012070732 started by @candour
Summary by CodeRabbit
Bug Fixes
Tests