Skip to the content

Gunjin軍人

Play five hidden-rank games, keep setups private, share redacted views and replay, and pass one device between players.

Gunjin is the Japanese word 軍人 for a soldier. About the name

Contents

Explanation

How rules, views and the player fit together

Preserved architecture and the authoritative/redacted boundaries.

Architecture

src/
├── draw.ts
├── gunjin-shogi.ts
├── hasami.ts
├── index-core.ts
├── index.ts
├── luzhanqi-mini.ts
├── match.ts
├── play.ts
├── replay.ts
├── rules/
│   ├── board.ts
│   ├── gunjinShogi.ts
│   ├── hiddenHasami.ts
│   ├── index.ts
│   ├── luzhanqiMini.ts
│   ├── salpakan.ts
│   ├── strategoLite.ts
│   └── types.ts
├── salpakan.ts
├── stratego-lite.ts
├── strings.ts
├── style.ts
├── trusted.ts
├── types.ts
└── views.ts

The engine is match.ts and the five modules under rules/: each rule module says what a mode's board is, what its roster is, where a piece may go and how a fight ends, and match.ts is the one lifecycle that applies them. The entry files at the top are thin: they re-export a mode's calls under its own names. views.ts and replay.ts are the only code that decides what may be seen, and draw.ts and play.ts take only what they produce.

Documentation

The shared generator reads public TypeScript declarations and checks native examples. It creates paired references/guides, Markdown twins, llms files and a local search index.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/gunjin 0.2.1.