This is a two-player game of Mancala, written in Python and built for the fx-CG50. Press AC when the outline is around the space you want to move. Let it load (this is also the point where you can exit the game if you wish), and after a few seconds, the next turn will start. At the bottom of the screen, news about the game will appear, such as when counters are stolen or free turns are acquired.
There are two Python files: Mancala, and MancalaC. C stands for compressed, and is way less readable in terms of code. However, it plays exactly the same, so if you aren't interested in the code, save on memory and choose MancalaC.
How to play Mancala:
The game begins with the blue player picking up all of the pieces in any one of the spaces on their side. Moving counter-clockwise, the player deposits one of the counters in each hole until the stones run out.
1. If you run into your own store, one counter is placed in it. If you run into your opponent's store, skip it.
2. If the last counter you drop is in your own store, you get a free turn.
3. If the last counter you drop is in an empty hole on your side, you capture that counter and any counters in the hole directly opposite.
4. All captured counters are placed in your store.
The game ends when all six spaces on one side of the Mancala board are empty. The player who still has pieces on his side of the board when the game ends captures all of those pieces. The winner is the player with the most pieces, but can also end in a draw if each player ends with 24 counters.
Known bug: Green doesn't steal from blue when their go ends on their penultimate space from the right, even when it should. TBH, I have spent too many hours trying to come up with the formulas for stealing (just look at line 98 on the uncompressed version), so fixing this is quite a low priority. This scenario shouldn't happen very often as well, as it requires green's counter setup to be exactly 00-01 (closest two spaces to the right) and also requires there to be counters in blue's penultimate from the right.
- 5 months, 2 weeks ago
- No ratings.
ReviewsNobody has reviewed this file yet.
- Py-Mancala (published 5 months, 2 weeks ago; 2023-04-13 10:39 UTC)