pcriv / mancala

Mancala game implementation in Go as an API

Home Page:https://go-mancala.herokuapp.com/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mancala

Mancala game implementation in Go as an API.

Usage

To run the server locally run the following command:

make setup
make local.run

Once you have the server running.

You can access the API docs at localhost:1323/docs

To create a new game:

curl -X POST localhost:1323/v1/games -H "Content-Type: application/json" --data '{"player1":"Rick","player2":"Morty"}'

To show the state of a game:

curl localhost:1323/v1/games/:id

To perform the next play:

curl -X PATCH localhost:1323/v1/games/:id -H "Content-Type: application/json" --data '{"pit_index":0}'

Notes

Games expire after 2 hours.

License

Copyright 2023 Pablo Crivella. Read LICENSE for details.

About

Mancala game implementation in Go as an API

https://go-mancala.herokuapp.com/docs

License:GNU General Public License v3.0


Languages

Language:Go 87.7%Language:Makefile 11.9%Language:Dockerfile 0.4%