A dropwizard service for playing chess.
Resource | Description | Example Payload |
POST /games |
Creates a new game. Specify a player ID of -1 for a computer opponent. |
{ "id": 123, "properties": { "white": "Yokota", "black": "Lang", "whiteId": 1, "blackId": 2 } } |
GET /games/{id} |
Retrieves an existing game. | |
DELETE /games/{id} |
Deletes an existing game. | |
POST /games/{id}/moves/{move} |
Make a move specified in algebraic notation. If playing with a computer, the computer will also move. |
|
POST /games/{id}/undomove |
Takes back a move (or 2 moves with a computer opponent). | |
GET /games/{id}/bestmove |
Retrieves a computer hint for the best move. |
Resource | Description |
GET /games/{id}/play?playerId={playerId} |
Displays a playable game from the perspective of the given player ID. |
GET /games/{id}/pgn |
Displays a game for examination. |