game-state-debugger

Community

Debug Fujian Mahjong game state issues.

AuthorTeng-AI
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: game-state-debugger
Download link: https://github.com/Teng-AI/mahjong/archive/main.zip#game-state-debugger

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.