Mancala
Game logic
Game state schema
message State {
// Required field to indicate the player who should be making the next move
// Values = 0 or 1
int32 player_turn_idx = 1;
/*
Array of size 14, indicating the 12 pockets and 2 Mancala. The indices go
counter-counterclockwise where indices 1-7 is player_idx 0 and the remaining
are player_idx 1. Index 7 is player_idx 0's Mancala. Index 0 is player_idx 1's
Mancala. The values of the board indicate how many pieces are in them.
*************************
* 0 13 12 11 10 9 8 *
* 1 2 3 4 5 6 7 *
*************************
*/
repeated int32 board = 4;
}
Action schema
Last updated