Skip to content

Repository files navigation

Sheng Ji Rules & Move Checker

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.

Local development

npm install
npm run dev

Vite prints the local URL. Create the production bundle with:

npm run build

The output is written to dist/.

Included

  • 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

Move checker scope

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.

Deployment

Pushing main runs .github/workflows/deploy-pages.yml, builds the Vite application, and deploys dist/ to GitHub Pages.

About

Interactive Sheng Ji rules guide and move checker

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages