You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did an agent review and a cursory look over the game file. I haven't read the rules, so the agent may be offbase in its rules interpretations. Here are some things to consider before we merge:
Blockers (rules correctness)
Active / blocked cells — Rules define active/blocked cells as those that share the intersection where a stone was (just) placed. adjacentRegions() currently selects regions whose center is in the 8 neighboring grid squares, not regions whose cells include that intersection. That affects neutral conversion, turn blocking, and blocked markers. Please switch to region membership (e.g. regions.filter(r => r.cells.includes(cell))) and verify against the rules example (e.g. after f6, blocked intersections / grey cells).
Neutral majority — Majority is over intersections not occupied by neutral (e.g. 5 intersections, 1 neutral → 4 remaining, majority 3). The code uses region.cells.length and only counts the mover’s stones; with multiple neutrals on a cell the threshold can be wrong. Denominator should follow “remaining non-neutral” slots.
Double-pass endgame — If both players are forced to pass with no connection, rules say count own-color stones (draw possible). checkEOG() returns early on any pass and doesn’t handle consecutive passes; please add that path (and a test).
Both players connect — If both have a valid connection after a move, the player who just moved wins. Please confirm the neutral-stone / otherPlayer() win branch can’t award the opponent when the mover also connected on the same turn.
Strongly recommended (AP norms)
experimental flag on gameinfo for initial catalogue ship.
test/games/bricka.test.ts — At minimum: region/blocking vs rules, neutral majority edge cases, wins (including neutral placements), full-board / pass tiebreak. Hula tests are a good template.
Constructor error — Replace copy-paste The Tritium engine cannot process... with Bricka (or generic game uid).
winningGroup — Either populate on win for render highlight (like Hula’s winningLoop) or remove from state/render until needed.
Nice to have
categories — Board/component tags consistent with similar connection games (e.g. components>simple>3c).
Neutral colour — Consider gameinfo.customizations and the custom colour function instead of hardcoded #aaa in legend.
Types/style — Array<IMoveState> / Array<APMoveResult>, import quote style, etc. (stack!: Array, results: Array = [] should be Array<IMoveState> / Array<APMoveResult>; import {union} from 'graphology-operators' vs repo double-quotes; trailing }; on class.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marino's game Bricka, rules here https://www.pergioco.net/1/bricka-en.html