Engine (wrapper.spec.ts), simulating the platform (persist only what toSave returns): - mid-turn buffers are tentative (toSave undefined, nothing persisted) and the full turn commits when it completes - bare move objects are accepted as one-element buffers; empty buffers are never saved - undo-by-truncation: replaying a shortened buffer from the committed base equals never having made the popped move (including undoing to empty with no server call) - scripted 2-player auction: sail-to-island commits immediately, a bid is a single-move committed turn, the auctioneer's mid-turn loan stays tentative, accept/decline commit and cannot be undone once control passes on - the saved log length never shrinks across committed states - moveAI always returns saveable states across a random 25-turn game; dropPlayer results are committed Viewer: replace the dead example unit test (missing HelloWorld component) with a real Calculator test so vue-cli-service test:unit passes. |
||
|---|---|---|
| .. | ||
| .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