Implementation of Kalah Game with Spring Boot and Java 8
- Gradle : 4.8.1
- Spring Boot : 2.0.3
- Java 8
- JPA
- H2
In order to build the game just run the command below in the root folder of the application
./gradlew clean build
In order to access Swagger UI of services, just go to http://localhost:8080/swagger-ui.html
from your browser.
- Firstly create a game and keep game id to join the game
- First player should join the game with game id, keep player id to continue and wait for the second player to start
- Second player should join the game with game id, keep player id to continue
- Game starts with the player's move who is chosen by the backend randomly
This endpoint creates new game.
POST /api/v1/games
This endpoint returns game by id.
GET /api/v1/games/{gameId}
This endpoint joins the game if available.
PUT /api/v1/games/{gameId}/join
This endpoint enable player to make a move.
PUT /api/v1/games/{gameId}/players/{playerId}/pits/{pitNo}