18 releases
0.2.0 | Dec 26, 2022 |
---|---|
0.1.16 | Feb 8, 2021 |
#21 in #board-game
24 downloads per month
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 )
‾‾‾‾‾‾‾‾‾‾‾‾‾