https://github.com/broderick-westrope/mancala-go
TUI Mancala game written in Golang.
https://github.com/broderick-westrope/mancala-go
api game go golang mancala mancala-game terminal-game tui
Last synced: 12 days ago
JSON representation
TUI Mancala game written in Golang.
- Host: GitHub
- URL: https://github.com/broderick-westrope/mancala-go
- Owner: Broderick-Westrope
- License: gpl-3.0
- Created: 2023-08-11T03:34:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T05:58:24.000Z (3 months ago)
- Last Synced: 2025-04-02T04:54:44.699Z (20 days ago)
- Topics: api, game, go, golang, mancala, mancala-game, terminal-game, tui
- Language: Go
- Homepage:
- Size: 1.18 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mancala-GO

If you're unsure what Mancala is, take a look [here](https://www.thesprucecrafts.com/how-to-play-mancala-409424) (or Google it if my link is broken).
This is a little personal project I created whilst learning Golang to test the power of the standard library, and also experiment with a few packages like:
- [Slog](https://pkg.go.dev/golang.org/x/exp/slog) (it was just coming out of experimental at the time and not yet adopted in my workplace)
- [Bubble Tea](https://github.com/charmbracelet/bubbletea) & [Bubbles](https://github.com/charmbracelet/bubbles) by [Charm](https://charm.sh/)I'm also taking the opportunity to try out a few Golang devtools like [Air](https://github.com/cosmtrek/air), [Delve](https://github.com/go-delve/delve), and (not Go specific) [DevContainers](https://code.visualstudio.com/docs/devcontainers/containers). I also recommend checking out [Lazygit](https://github.com/jesseduffield/lazygit) if you haven't already. It's by no means new to my toolkit, but it's awesome and made with Go.
An opponent is included. It is built using the Minimax algorithm, and can be used by providing the flag `-mode minimax`.
Any feedback is much appreciated :)
## Inspirations
- [sku Sudoku](https://github.com/fedeztk/sku): Bubble Tea, Bubbles
- [gambit Chess](https://github.com/maaslalani/gambit): [Bubble Tea](https://github.com/charmbracelet/bubbletea), [Bubbles](https://github.com/charmbracelet/bubbles), [Wish](https://github.com/charmbracelet/wish)
- [mancala](https://github.com/pcriv/mancala): Core game logic, testing, REST API## Roadmap
Some more things I'm thinking of adding:
- Improved algorithm & performance for the Minimax opponent.
- Remote play with SSH (maybe [Wish](https://github.com/charmbracelet/wish)), WebSockets, or something else (this stuff is not my forte). So far I'm leaning towards SSH because from what I can tell I'd need a central server for the WebSocket approach.
- REST API to interact with the core engine, which I'd then deploy :)## Gifs
You may notice some `*.tape` files in the repo. These are used to generate the gifs used for the docs (like seen at the top). This is done using [VHS](https://github.com/charmbracelet/vhs) which is another awesome tool by Charm. It provides a simple format for creating terminal recordings.