diff --git a/routes/game.py b/routes/game.py index 17779f1..ec215b3 100644 --- a/routes/game.py +++ b/routes/game.py @@ -1,11 +1,29 @@ """Live game session routes. Endpoints: - POST /api/game/start — create a new live game session (called by LobbySetupModal) - POST /api/game/action — submit a human player action (called by HumanActionBar) + POST /api/game/start -- create and launch a live Forge game session + POST /api/game/action -- submit a human player action (called by HumanActionBar) + GET /api/game/{game_id}/status -- poll session status and last known game state + GET /api/game/{game_id}/actions -- Forge IPC: drain pending human actions + GET /api/game/sessions -- list active sessions (debug) + +Forge IPC flow +-------------- + 1. POST /api/game/start + - Validates seats, resolves deck names + - Picks a playstyle per AI seat from seat_type (e.g. "AI Aggro" -> "aggro") + - Calls run_batch_subprocess(num_games=1, use_learned_policy=True, ...) + which builds the Java command with --policy