Pallanguzhi is a traditional mancala game played in South India.

Game Rules

There are 14 cups in the game. Each player has 7 cups.

  1. Fill each hole with 5 tokens.

  2. The first player starts by picking up all the tokens in one hole from their side of the board. They then drop the tokens one by one in each hole in an anti-clockwise direction.

  3. When there are no more tokens in hand, the player picks up all tokens in the next hole and continues distributing them around the board.

  4. They continue until there are no more tokens in hand and they reach an empty hole.

  5. When this happens, the player wins all tokens in the hole next to the empty one. If both holes are empty, they player does not win any tokens for that round.

  6. The second player then takes their turn and follows steps 2-5.

  7. The game continues until all tokens are taken from the board.

  8. At any point in the game, if a cup has 4 tokens, the player on whose side it occurs can collect the 4 tokens.

  9. The player with the greatest number of tokens at the end of the game wins.

  10. You can continue playing additional rounds by setting the board with acquired tokens 5 per cup. You cannot have partial cups at the start of a new round. This repo assumes there are 12 rounds in a game.

Playing

This will download the source and a pre-built model

curl -o pallanguzhi.tar.gz \
  https://rahulsom.github.io/pallanguzhi/pallanguzhi.tar.gz
test -d pallanguzhi && rm -rf pallanguzhi
mkdir -p pallanguzhi
cd pallanguzhi
tar xzvf ../pallanguzhi.tar.gz

Then you can run it

make run

Building

See the README at rahulsom/pallanguzhi for building instructions.