This is an implementation of the Kalah game. The current implementation uses Spring Boot to serve the functionalities.
KalahApplication
is responsible for starting the web service.
To start the application you can use one of the following commands:
mvn spring-boot:run
(Development environment only)java -jar kalah-<version>.jar
Currently, there are two endpoints available with the POST
http method:
- One to create a game
http://<host>:8080/games
- One to make a move
http://<host>:8080/games/{gameId}/pits/{pitId}
gameId
is generated by the applicationpitId
is fixed between game and should be in one of these two intervals: [1, 6] or [8, 13]
api
contains the classes that are used to expose the gameapi.response
contains the classes used as a response for the APIsgame
contains the actual logic for the game
- The file
lombok.config
is used to configure Lombok to expose the constructor properties' name to allow Jackson to deserialise the object into json.