Simple Mancala Game
Create a mancala game using as few bytes as possible.
Mancala is a family of games where a player has a control over a set amount of pots filled with stones/seeds. The particular version which you should implement has a board with 14 pots, of which two are designated as scoring pots. At the start of the game the scoring pots are empty and each of the other pots contains 4 stones. On each player's turn they select one non-empty non-scoring pot, remove the stones from it, and starting with the next pot counter-clockwise they place one stone per pot, moving counterclockwise, until they have placed them all.
Unlike some other variants, there is no way to get a second turn. Once the stones from one pot have been redistributed, the play passes to the other play.
The game ends when all the stones are in the scoring pots, so that there is no valid move remaining.
Implement a simple program to allow two players to play against each other at a shared computer. No AI is required.
For the purposes of input, the pots are labelled as shown:
The scoring pots are
The input will be a list of pots separated by a semicolon: e.g.
R2P3;R2P1. These represent the moves in order from left to right. You may assume that each move is valid.
The output will be the number of stones in each pot after the input moves have been performed. The output need not use brackets in the same way as the diagram above or the examples below, but the pots must be distinguishable and the scoring pots should also be clearly distinguished from regular ones.
The initial board position is
R2P3 the output should be
placing the four stones from
R2P3 in the first four pots working counter-clockwise from
R2P3;R2P1 the output should be