RexBoard Match And Puzzle
Use this skill for symbol and pattern matching on a RexBoard board.
Use This First
Choose the matching style:
| Need |
Use |
| Same-symbol line |
match(3, callback) or another length |
| Specific pattern |
match(['A', 'A', 'B'], callback) |
| Any-match validation |
anyMatch(...) |
| Connected same-symbol group |
group(tileX, tileY) |
| Symbols stored on chess objects |
refreshSymbols(callback) |
Match reports tile coordinates. Game code still swaps pieces, removes chess, spawns replacements, and animates results.
Required Setup
This skill assumes a RexBoard Board or LogicBoard exists. If symbols live on chess objects, use rexboard-board-and-chess first.
References
Read these only when needed:
references/match-config.md: setup, config fields, callbacks, and methods.
references/match-patterns.md: fixed-length, array, wildcard, direction mask, and group matching.
references/match-recipes.md: reduced recipes for matching symbols from chess, test swaps, and group rules.
Core Rules
- Keep board occupancy and match symbols in sync.
- Prefer
refreshSymbols when symbols live on chess objects.
- Use
null for empty/no symbol; use an explicit wildcard symbol for wildcard behavior.
- Use
dirMask to limit which board directions are checked.
- Do not expect
Match to animate, destroy, or spawn game objects.
Source File Map
plugins/board/match/Match.d.ts: config, callbacks, methods, and result type.
plugins/board/match/Factory.js: match factory signature.
plugins/board/board/LogicBoard.d.ts: board traversal and chess lookup used by matching.
Related Skills
rexboard-board-and-chess: chess lookup, swaps, removal, and occupancy.
rexboard-grids-and-coordinates: direction masks depend on grid direction behavior.
rexboard-rendered-tiles-and-pieces: rendered puzzle pieces.
rexboard-movement-and-pathfinding: animated movement after match decisions.
Gotchas
- Direction indexes depend on grid mode; configure
dirMask after choosing quad/hex grid behavior.
- Test-swap workflows must restore the board if the swap is rejected.
1---2name: rexboard-match-and-puzzle3description: Use this skill when working with RexBoard match, Match, board symbol matching, match-3, bejeweled-style RexBoard puzzles, wildcard symbols, dirMask, refreshSymbols, line patterns, array patterns, group matching, or board puzzle resolution. Triggers on: RexBoard match, RexBoard Match, board match, match-3, bejeweled, wildcard, dirMask, refreshSymbols.4---56# RexBoard Match And Puzzle78Use this skill for symbol and pattern matching on a RexBoard board.910## Use This First1112Choose the matching style:1314| Need | Use |15|---|---|16| Same-symbol line | `match(3, callback)` or another length |17| Specific pattern | `match(['A', 'A', 'B'], callback)` |18| Any-match validation | `anyMatch(...)` |19| Connected same-symbol group | `group(tileX, tileY)` |20| Symbols stored on chess objects | `refreshSymbols(callback)` |2122`Match` reports tile coordinates. Game code still swaps pieces, removes chess, spawns replacements, and animates results.2324## Required Setup2526This skill assumes a RexBoard `Board` or `LogicBoard` exists. If symbols live on chess objects, use `rexboard-board-and-chess` first.2728## References2930Read these only when needed:3132- `references/match-config.md`: setup, config fields, callbacks, and methods.33- `references/match-patterns.md`: fixed-length, array, wildcard, direction mask, and group matching.34- `references/match-recipes.md`: reduced recipes for matching symbols from chess, test swaps, and group rules.3536## Core Rules3738- Keep board occupancy and match symbols in sync.39- Prefer `refreshSymbols` when symbols live on chess objects.40- Use `null` for empty/no symbol; use an explicit wildcard symbol for wildcard behavior.41- Use `dirMask` to limit which board directions are checked.42- Do not expect `Match` to animate, destroy, or spawn game objects.4344## Source File Map4546- `plugins/board/match/Match.d.ts`: config, callbacks, methods, and result type.47- `plugins/board/match/Factory.js`: `match` factory signature.48- `plugins/board/board/LogicBoard.d.ts`: board traversal and chess lookup used by matching.4950## Related Skills5152- `rexboard-board-and-chess`: chess lookup, swaps, removal, and occupancy.53- `rexboard-grids-and-coordinates`: direction masks depend on grid direction behavior.54- `rexboard-rendered-tiles-and-pieces`: rendered puzzle pieces.55- `rexboard-movement-and-pathfinding`: animated movement after match decisions.5657## Gotchas5859- Direction indexes depend on grid mode; configure `dirMask` after choosing quad/hex grid behavior.60- Test-swap workflows must restore the board if the swap is rejected.