No description
- TypeScript 58.1%
- Vue 15.9%
- JavaScript 13.9%
- Python 9.8%
- Shell 2.1%
- Other 0.2%
yvessl reported in September 2023 that the China map does not match the printed board. Every item still held; nothing had been applied. Names (enum values, so the strings players actually see): Qiqhaer -> Qiqha'er Qingoad -> Qingdao Badtou -> Baotou Kuerle -> Ku'erle Xian -> Xi'an Chiyang -> Guiyang Yinchjan -> Yinchuan Four of these were plain transcription errors (Qingoad/Badtou/Chiyang/Yinchjan); the other three were missing apostrophes. Enum KEYS were renamed only where the key itself was misspelled -- Qiqhaer/Kuerle/Xian keep their identifier-safe keys and carry the apostrophe in the value. Connection: Changchun-Jilin was cost 5, the board says 2. Also: engine/.eslintrc.js `quotes` gains `avoidEscape: true`. Three of the new names contain an apostrophe, and without that option the rule and Prettier deadlock -- Prettier rewrites 'Xi\'an' to "Xi'an" to minimise escapes, and the rule then errors on exactly what Prettier produced. avoidEscape is the standard companion setting; engine-wide lint is unchanged at 0 errors / 30 warnings. Tests: 72 specs (+3). China had no coverage at all before this. The two regression specs are teeth-checked against the pre-change map (they fail with "Qiqha'er is on the map" and "expected 5 to equal 2"); they assert on the map module rather than through setup(), because setup() trims cities by player count and would quietly stop covering whichever names fell out of play. The third spec walks every connection endpoint against the city list, so a rename that missed a reference fails loudly. DEPLOY NOTE -- this is the replay-breaking class, not an inert one, though the blast radius is small and recoverable. Live game state stores its own map, so a China game already in progress keeps playing on the old names. What breaks is the replay view: wrapper.replay() rebuilds from a fresh setup() and re-applies logged moves, so a logged Build on "Qingoad" no longer matches a map that says "Qingdao". Measured against a real 6P China game -- it throws "Wrong argument for the command Build", i.e. it fails loudly rather than diverging silently. The player-facing path (GET /gameplay/:id/log?end=N) is read-only, so a player who hits it can refresh and carry on; the variant that persists (POST /gameplay/:id/replay) is admin-only. At time of writing exactly one live China game exists. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .husky | ||
| engine | ||
| viewer | ||
| .editorconfig | ||
| .gitignore | ||
| .gitpod.dockerfile | ||
| .gitpod.yml | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
Power Grid
Mono repo containing the viewer & the engine for Power Grid
Checkout their READMEs:
Demo
Check out boardgamers.space! Reach out to us if you want to contribute.
Install
Do pnpm install in the main folder
Test locally
After the installation step, you can run the viewer with:
cd viewer
npm run serve
It will use the engine in its sibling folder