### Start a New Game Source: https://hidden-empire.mctx.ai Initiates a new game of The Hidden Empire text adventure. This function returns the initial game text and a unique playthrough ID that is essential for all subsequent commands. ```APIDOC ## POST /start_game ### Description Starts a new game of The Hidden Empire text adventure. Returns the opening game text and a playthrough_id you must keep in memory and pass to do_command for every subsequent command. If you lose the ID, use list_saves to recover it. ### Method POST ### Endpoint /start_game ### Parameters #### Request Body - **save_name** (string) - Optional - The name to save the playthrough under. ### Request Example ```json { "save_name": "my_first_adventure" } ``` ### Response #### Success Response (200) - **opening_text** (string) - The initial text displayed at the start of the game. - **playthrough_id** (string) - A unique identifier for the current game session. #### Response Example ```json { "opening_text": "You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here.", "playthrough_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Execute a Command Source: https://hidden-empire.mctx.ai Sends a natural language command to the Z-machine game engine and receives the game's response. This endpoint requires a playthrough ID obtained from starting or loading a game. ```APIDOC ## POST /do_command ### Description Send a command to the Z-machine game engine and receive the response. Requires a playthrough_id from start_game. Commands are natural language: "go north", "take lamp", "look", "inventory", etc. ### Method POST ### Endpoint /do_command ### Parameters #### Request Body - **playthrough_id** (string) - Required - The unique identifier for the current game session. - **command** (string) - Required - The natural language command to execute in the game. ### Request Example ```json { "playthrough_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "command": "go north" } ``` ### Response #### Success Response (200) - **response_text** (string) - The text output from the game engine in response to the command. #### Response Example ```json { "response_text": "You are now in a dark forest. There is a path leading east." } ``` ``` -------------------------------- ### Reset a Game Source: https://hidden-empire.mctx.ai Resets a specific playthrough to the beginning of the game, discarding all current progress. The playthrough ID remains the same, allowing for continued saves under the same identifier. To start a completely new game with a different name, use `start_game`. ```APIDOC ## POST /reset_game ### Description Reset a playthrough to the beginning, discarding all progress. The playthrough ID is preserved so you can continue with the same name. This cannot be undone. To start fresh under a different name without losing this save, use start_game with a new save_name instead. ### Method POST ### Endpoint /reset_game ### Parameters #### Request Body - **playthrough_id** (string) - Required - The unique identifier for the playthrough to reset. ### Request Example ```json { "playthrough_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation that the game has been reset. #### Response Example ```json { "message": "Playthrough a1b2c3d4-e5f6-7890-1234-567890abcdef has been reset." } ``` ``` -------------------------------- ### Load a Saved Game Source: https://hidden-empire.mctx.ai Restores a saved game playthrough to its last saved state, providing the user with their previous position, score, and move count. The `last_output` should be presented to re-orient the user before they are prompted for their next command. ```APIDOC ## POST /load_save ### Description Retrieve the last saved state for a playthrough — shows where you left off, your score, and move count. Present last_output to the user to re-orient them before prompting for the next command. To continue playing, call do_command with the same playthrough_id. ### Method POST ### Endpoint /load_save ### Parameters #### Request Body - **playthrough_id** (string) - Required - The unique identifier for the playthrough to load. ### Request Example ```json { "playthrough_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **last_output** (string) - The game text from the last saved state. - **score** (integer) - The score at the last saved state. - **moves** (integer) - The number of moves made up to the last saved state. #### Response Example ```json { "last_output": "You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here.", "score": 50, "moves": 120 } ``` ``` -------------------------------- ### List Saved Playthroughs Source: https://hidden-empire.mctx.ai Retrieves a list of all saved game playthroughs for the current user, including their IDs, scores, and last updated timestamps. ```APIDOC ## GET /list_saves ### Description List all saved playthroughs for the current user. Returns playthrough IDs, scores, move counts, and last updated timestamps (ISO 8601 UTC). ### Method GET ### Endpoint /list_saves ### Parameters None ### Response #### Success Response (200) - **saves** (array) - An array of saved playthrough objects. - **playthrough_id** (string) - The unique identifier for the saved playthrough. - **score** (integer) - The current score in the saved playthrough. - **moves** (integer) - The number of moves made in the saved playthrough. - **last_updated** (string) - The ISO 8601 UTC timestamp of the last save. #### Response Example ```json { "saves": [ { "playthrough_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "score": 50, "moves": 120, "last_updated": "2023-10-27T10:00:00Z" }, { "playthrough_id": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "score": 25, "moves": 60, "last_updated": "2023-10-26T15:30:00Z" } ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.