Skip to content


Repository files navigation


Creating a Game

     curl -X POST[?playerCount=<n>]
     EXAMPLE: curl -X POST
     { "uuid":"e1c84105-b3e7-4717-b808-64be88938e7e", ... }

uuid is the unique identifier to the new game that has been created. This id is used in the future to refer to this game. If playerCount isn't specified, the number of players will default to 4.

Joining a Game

     curl -X POST<game-id>/join/<player-name>
     EXAMPLE: curl -X POST
     {  "name":"StigHelmer",  "uuid":"12ea309a-8e3b-4b75-87d0-15d1670baaab", ... }

uuid is the unique identifier of the player. This id is secret to the player and is used in the future when executing moves for this player.

Getting Game State

Once the game has enough players joined (normally 4), it is no longer considered a "new-game". Instead it is found under /games/

     EXAMPLE: curl
     { "uuid":"e1c84105-b3e7-4717-b808-64be88938e7e", ... "currentPlayer":{ "name":"StigHelmer" }}

This response contains everything there is to know about the state of the game, including who's turn it is to make a move and the current score.

Getting Available Moves

In order to make a move, we ask the API to list all available moves:

     EXAMPLE: curl
     { "moves": [{ "number":0, ... }]}

This response lists all available moves for the current player. Each move has a number which can be used in a future call to refer to the move to be executed.

Making a Move

     curl -X POST<game-id>/players/<player-id>/moves/<move-number>
     EXAMPLE: curl -X POST
     { <updated game-state> }

kdom Java Client

Here is an implementation for a client in Java: You can see one example of Game here: