A responsive React + TypeScript guide for a four-player, two-deck Sheng Ji house ruleset. The interface is organized into focused Learn, Trump & Play, Scoring, Move Checker, and FAQ tabs.
npm install
npm run devVite prints the local URL. Create the production bundle with:
npm run buildThe output is written to dist/.
- Beginner walkthrough and visual rule reference
- Dynamic Zhu ranking chart for every level and suit
- Setup, calling, following, pairs, tractors, throws, scoring, and level progression
- House rule for non-consecutive tractors
- Score outcome calculator
- Interactive move-legality checker with card picker and worked presets
- Responsive tabbed navigation with shareable URL hashes
The checker validates the supplied hand and play for:
- Card count
- Following ordinary suit or Zhu
- Playing every remaining card in the led category when short
- Pair obligations
- Tractor obligations and pair preservation
- Matching structure when trumping pairs and tractors
- Current winner for singles, pairs, and pure tractors
Non-consecutive tractors require the table to confirm that no player holds an intervening pair. Mixed throws are checked for their basic following obligations, but their final winner may require a component-by-component table ruling.
Pushing main runs .github/workflows/deploy-pages.yml, builds the Vite application, and deploys dist/ to GitHub Pages.