Irregular Board Generation and Linear Pillar Clustering#198
Conversation
- Modified `MapGenerator.kt` to remove `height / 2` random edge tiles, creating an irregular board shape. - Enforced a minimum width of 4 tiles per row during hole removal. - Protected start and end rows from hole removal to ensure entrance/exit stability. - Refactored `generateClumpedPillars` to grow in lines instead of blobs. - Adjusted cluster count to target 3-4 clusters on average. - Verified changes with new unit tests for board properties and connectivity. 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. |
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModifies MapGenerator.kt's vertical map generation to carve randomized edge holes and recompute start/end positions accordingly, and changes pillar clustering to clamp core count between 2-5 and use linear directional growth instead of probabilistic blob expansion. ChangesMap Generation Logic
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Poem A hare hopped through the hex-tile maze, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/src/main/java/com/messark/hawker/utils/MapGenerator.kt (1)
45-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winStale
startPos/endPosreference after introducingfinalStartPos/finalEndPos.
finalStartPos/finalEndPosare correctly computed and used for path generation (line 90) and tile typing (lines 103-104), but the obstruction-candidate filter at Lines 93-95 still excludes based on the originalstartPos/endPos, not the recomputed final positions:val obstructionCandidates = allCoords.filter { it != startPos && it != endPos && it !in path }.toMutableSet()This is currently masked because hole removal is restricted to rows
1 until height - 1, sostartR/endRare always protected andfinalStartPos == startPos/finalEndPos == endPosin practice — making the recompute fallback at lines 78-87 effectively dead code too. If hole-carving logic is ever extended to touch start/end rows, this stale reference would silently let pillar cores land on the entrance/exit tile's coordinate (wasting cluster budget), relying only on thewhenordering at lines 103-104 to mask the mistake.🔧 Proposed fix
val obstructionCandidates = allCoords.filter { - it != startPos && it != endPos && it !in path + it != finalStartPos && it != finalEndPos && it !in path }.toMutableSet()
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3be50450-1c60-4eb3-858d-e09f9912d73e
📒 Files selected for processing (1)
app/src/main/java/com/messark/hawker/utils/MapGenerator.kt
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
This change makes the game board more organic and less rigid. It introduces "holes" along the edges by removing a number of tiles equal to half the board's height, while ensuring every row maintains a minimum width of 4 and that the entrance and exit are always reachable. Additionally, pillar generation has been updated to create small, linear clusters (lines) rather than large masses (blobs), with a target of 3-4 clusters per board.
PR created automatically by Jules for task 6605583459429279648 started by @candour
Summary by CodeRabbit