The whole-turn buffer is replayed from the committed state; committing is what grants the mover their per-turn time increment. In the degenerate all-others-dropped case a buffer like [..., Pass, ...more] is a sequence of individually legal moves spanning several turns — it would commit them all for a single increment. Throw as soon as a committed move is followed by more buffer elements. Also log an error when moveAI's 500-iteration force-commit safety net fires, so a would-be livelock is visible in server logs instead of being silently masked. Tests: malformed buffer rejection (nothing half-applied leaks) and multi-turn buffer rejection. |
||
|---|---|---|
| .. | ||
| .vscode | ||
| src | ||
| .eslintrc.js | ||
| .gitignore | ||
| .travis.yml | ||
| index.ts | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| wrapper.ts | ||
container-engine
Typescript engine for Container.
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