Crate libmancala

source ·
Expand description

libmancala

A frontend-agnostic library that implements the game of Mancala.

The rules are implemented as specified on the Mancala page of the Official Game Rules website.

Example

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);

Structs

Contains data relevant to the game.

Enums

The pit the player has selected to move.
The state of the game as the result of a move.
Used to identify a player.