update_world
Update the game world by replacing scalars and lists, merging flags, and validating invariants. The sole method to set the victory flag and advance the turn counter.
Instructions
Patch the world. Scalars/lists (current_location, visited_locations, known_npcs, turn) are replaced; 'flags' is merged key-wise so one flag can be set without dropping others. Invariants are validated; on error the state is left unchanged. Sole legal path to set the victory flag and advance the turn counter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turn | No | ||
| flags | No | ||
| known_npcs | No | ||
| current_location | No | ||
| visited_locations | No |