#board-game #game #mancala

mancala_board

A package with a minimal mancala board to play with

18 releases

0.2.0 Dec 26, 2022
0.1.16 Feb 8, 2021

#235 in Games

41 downloads per month

MIT license

16KB
332 lines

Mancala Board

Features

  • Print board
  • Calculate moves without avalanche
  • Detect game over
  • Detect winner
  • Generate basic board
  • Arbitrary board size (const)
  • Generate random board
  • Calculate moves with avalanche
Board structure:
 _____________
(      RB     )
 ‾‾‾‾‾‾‾‾‾‾‾‾‾
 ____  |  ____
( L1 ) | ( R6 )
 ‾‾‾‾  |  ‾‾‾‾
 ____  |  ____
( L2 ) | ( R5 )
 ‾‾‾‾  |  ‾‾‾‾
 ____  |  ____
( L3 ) | ( R4 )
 ‾‾‾‾  |  ‾‾‾‾
 ____  |  ____
( L4 ) | ( R3 )
 ‾‾‾‾  |  ‾‾‾‾
 ____  |  ____
( L5 ) | ( R2 )
 ‾‾‾‾  |  ‾‾‾‾
 ____  |  ____
( L6 ) | ( R1 )
 ‾‾‾‾  |  ‾‾‾‾
 _____________
(     LB      )
 ‾‾‾‾‾‾‾‾‾‾‾‾‾

No runtime deps