https://github.com/pcriv/mancala
Mancala game implementation in Go as an API
https://github.com/pcriv/mancala
api golang mancala-game
Last synced: 5 months ago
JSON representation
Mancala game implementation in Go as an API
- Host: GitHub
- URL: https://github.com/pcriv/mancala
- Owner: pcriv
- License: gpl-3.0
- Created: 2020-02-01T16:55:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2026-02-08T00:18:13.000Z (5 months ago)
- Last Synced: 2026-02-08T09:05:56.214Z (5 months ago)
- Topics: api, golang, mancala-game
- Language: Go
- Homepage: https://go-mancala.herokuapp.com/docs
- Size: 746 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mancala
Mancala game implementation in Go as an API.
## Usage
To run the server locally run the following command:
```sh
make setup
make rest-server
```
Once you have the server running.
You can access the API docs at [localhost:1323/docs](http://localhost:1323/docs)
To create a new game:
```bash
curl -X POST localhost:1323/v1/games -H "Content-Type: application/json" --data '{"player1":"Rick","player2":"Morty"}'
```
To show the state of a game:
```bash
curl localhost:1323/v1/games/:id
```
To perform the next play:
```bash
curl -X POST localhost:1323/v1/games/:id/plays -H "Content-Type: application/json" --data '{"pit_index":0}'
```
### Notes
Games expire after 2 hours.
## License
Copyright 2023 [Pablo Crivella](https://pcriv.com).
Read [LICENSE](LICENSE) for details.