What problem does it solve?
Debug Fujian Mahjong game state data to quickly identify inconsistencies, miscounted tiles, stuck turns, or desyncs in multiplayer sessions.
Core Features & Use Cases
- Tile count validation: checks total tiles across wall, discard pile, exposed gold, players' concealed tiles, melds, and bonus tiles for a 128-tile game.
- Duplicate detection: ensures every tile appears exactly once across all locations.
- Hand size checks: validates concealed plus meld tiles per player and phase to catch miscounts.
- Gold tile tracking: validates gold tiles across all locations to ensure there are 4 gold tiles in play.
- Turn and phase validation: enforces correct turn order and valid calling phases to detect stalls.
- Meld validation: verifies meld types and sizes (pung/chow/kong) and their tile validity with respect to gold tiles.
- Full state dump & reporting: provides detailed dumps and a validation report to guide debugging.
Quick Start
Run the full validation and dump using generateValidationReport with the current game state and private hands.