#mancala #board-game #player #move #frontend-agnostic #mancala-board

libmancala

A frontend-agnostic library that implements the game of Mancala

2 stable releases

1.1.0 Nov 17, 2022
1.0.0 Nov 17, 2022

#1071 in Game dev

AGPL-3.0-or-later

16KB
193 lines

libmancala

About

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.

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

See also

I've written a simple command-line Mancala game using this library. You can check it out for reference if you'd like:

Mancala Console


lib.rs:

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

No runtime deps