The test seeded the game but not the bots, which choose with Math.random, so a game could now and then draw the Step 3 card during Step 1 and skip Step 2 (Engine - Test failed this way on master after #173, then passed on re-run). A sweep of 400 bot seeds: deck2 skips Step 2 in 13 games (3.3%), deck1 in 1. Seeding Math.random per deck, as wrapper.spec does, makes the test the same on every run. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| scripts | ||
| src | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitignore | ||
| .pnpm-debug.log | ||
| .travis.yml | ||
| index.ts | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| wrapper.ts | ||
powergrid-engine
Typescript engine for Power Grid.
Setup
Requirements
Recent version of node / pnpm.
Dependencies
In the project's folder:
pnpm
Build
To compile Typescript into javascript:
pnpm build
Test
pnpm test