mancala

command module
v0.0.0-...-b9a5078 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

README

Mancala

Mancala game implementation in Go as an API.

Usage

To run the server locally run the following command:

make setup
make rest-server

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 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. Read LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
connectrpc command
restapi command
web command
internal
openapi
Package openapi provides primitives to interact with the openapi HTTP API.
Package openapi provides primitives to interact with the openapi HTTP API.
protoconnect
buf:lint:ignore PACKAGE_DIRECTORY_MATCH buf:lint:ignore PACKAGE_VERSION_SUFFIX
buf:lint:ignore PACKAGE_DIRECTORY_MATCH buf:lint:ignore PACKAGE_VERSION_SUFFIX

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL