Documentation

Test and maintain

v2 · Stable

Test a game with MCP

1. Validate the working files

Call validate_code for the game. Resolve source and page errors before testing the result.

Done when validation accepts the working files.

2. Start a session

Call start_game with a supported player count. Keep its stateRef and inspect its activePlayers.

Done when the initial position has the intended players and legal choices.

3. Exercise the game

Choose a returned button or selectable item and call apply_action. Read state with inspect_state. Use set_state for a focused test position; entity path segments are IDs, not array positions.

Done when normal moves, refused moves, and the ending behave as intended.

4. Inspect each view

Call render_game for the players and spectator. Check private information and the layout. Use save_checkpoint for a useful TypeScript test position.

Done when each viewer sees only the expected information.

5. Recheck changes

Restart with start_game after editing source. A running session keeps the code it started with. Commit only after testing that source.

Done when the committed version is the version you validated and played.

Need a hand with this?

Join our Discord