Play Ankh-Morpork Scramble, a turn-based sports game via REST API. Manages game flow, coordinates gameplay phases (setup, kickoff, playing), and makes tactical decisions for team management.
Ankh-Morpork Scramble is a turn-based sports game where two teams compete to score "Scratches" by getting the ball into the opponent's end zone. The game consists of:
Two halves: 8 turns per team each half
Pitch size: 26×15 squares
Team size: 3-11 players on pitch
Actions per turn: Move, Scuffle (block), Charge, Hurl (pass), etc.
Game Phases
The game progresses through these phases:
DEPLOYMENT: Setup phase - buy players, place them on pitch
KICKOFF: Ball kick-off, determine receiving team
Skills relacionados
PLAYING: Main gameplay - teams take turns executing actions
API Configuration
Base URL: http://localhost:8000 (or your server URL)
All API calls use REST HTTP methods with JSON payloads.
Key Concept: The server always has an active game running. You don't need to create or search for games!
Core Workflow
1. Get Current Game
curl http://localhost:8000/current-game
This returns the current game state including:
game_id - Use this in subsequent API calls
team1 and team2 - Team information with IDs
phase - Current game phase (DEPLOYMENT, KICKOFF, PLAYING)
Player positions and all game state
Extract the game_id from this response - you'll use it for all subsequent calls.
2. Join the Game
curl -X POST "http://localhost:8000/game/{game_id}/join?team_id={your_team_id}"
Response indicates if you've successfully joined.
3. Check Game State (When Needed)
curl http://localhost:8000/game/{game_id}
Returns the same information as /current-game but requires you to know the game ID.