No description
  • TypeScript 58.1%
  • Vue 15.9%
  • JavaScript 13.9%
  • Python 9.8%
  • Shell 2.1%
  • Other 0.2%
Find a file
goldjohn6 6fb432a041
China: correct seven city names and the Changchun-Jilin cost (#59) (#117)
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>
2026-08-14 09:26:23 -07:00
.devcontainer prettier 2025-08-09 20:56:35 +00:00
.github Soak test and misc fixes (#81) 2026-05-17 12:02:47 +02:00
.husky Initial 2021-10-13 00:09:21 -03:00
engine China: correct seven city names and the Changchun-Jilin cost (#59) (#117) 2026-08-14 09:26:23 -07:00
viewer 🔖 powergrid-viewer 1.11.21 2026-08-13 18:52:38 +00:00
.editorconfig Initial 2021-10-13 00:09:21 -03:00
.gitignore japan free jump 2026-05-25 13:20:16 +00:00
.gitpod.dockerfile Initial 2021-10-13 00:09:21 -03:00
.gitpod.yml Initial 2021-10-13 00:09:21 -03:00
.npmrc Initial 2021-10-13 00:09:21 -03:00
.prettierignore add package.json to .gitignore 2025-08-09 21:32:06 +00:00
.prettierrc Initial 2021-10-13 00:09:21 -03:00
package.json update engine-publish 2025-08-09 21:12:39 +00:00
pnpm-lock.yaml update engine-publish 2025-08-09 21:12:39 +00:00
pnpm-workspace.yaml Initial 2021-10-13 00:09:21 -03:00
README.md Remove Gitpod badge from README 2026-04-27 12:34:47 +02:00

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