Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pcriv/mancala
Mancala game implementation in Go as an API
https://github.com/pcriv/mancala
api golang mancala-game
Last synced: 3 days 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 (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T09:05:12.000Z (3 months ago)
- Last Synced: 2024-08-26T11:15:40.794Z (3 months ago)
- Topics: api, golang, mancala-game
- Language: Go
- Homepage: https://go-mancala.herokuapp.com/docs
- Size: 652 KB
- Stars: 1
- Watchers: 2
- 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 local.run
```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 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](https://pcriv.com).
Read [LICENSE](LICENSE) for details.