| Crates.io | libmancala |
| lib.rs | libmancala |
| version | 1.2.0 |
| created_at | 2022-11-17 22:22:22.335669+00 |
| updated_at | 2025-03-29 22:37:20.552113+00 |
| description | A frontend-agnostic library that implements the game of Mancala. |
| homepage | |
| repository | https://codeberg.org/cosmicmarley17/libmancala.git |
| max_upload_size | |
| id | 717534 |
| size | 45,918 |
A frontend-agnostic Rust library that implements the game of Mancala.
The rules are implemented as specified on the Mancala page of the Official Game Rules website.
use libmancala::{MancalaBoard, Move, MoveResult, Player};
let mut board = MancalaBoard::new();
// Your code to get input from the player to make a move
let input: Move = make_move();
let (game_state, bonus_turn, captured) = board.update(&input);
I've written a simple command-line Mancala game using this library. You can check it out for reference if you'd like: