This I hope will be a multipart series of progress I make building Kadi. I didn't know how to play Kadi till my last year of college. And even then, I still kinda suck at it. So why automate it? Honestly I don't know, it seems like fun and it will have me implementing some pretty cool concepts if I build it to the standards I have in mind.
Kadi rules in Kenya varies from region to region, so I wanted to first define the ruleset I will be using.
There are 3 types of cards.
2 , 3 and J are considered feeding card. When played, the next player has to pick 2, 3 or 5 cards respectively, or add a compatible feeding card. A compatible feeding card would have the same face/number, i.e if a 2 of Hearts is played a compatible feeding card would be a 2 of Clubs/Spades/Diamonds, a 3 of hearts or a J of Hearts.
4 to 10
These are cards that can be played to win the game. Of note is that 8 and Q are question cards that have to be played with an answer. An answer is a compatible face from 4-10. This means you can drop an 8 of hearts with a 4 of hearts. You can also stack question cards together as long as the last card stacked has a compatible answer played after it.
A, K, J, Q and the Joker
A can be used to demand a change in the face being played. For instance, if the game was Hearts, you can play A to request the face be changed to a Diamond.
J skips the next player's turn
K is a kickback meaning the game continues in the opposite direction.
You can not win the game if you have any of the Special Cards.
There is a starter_card placed on the table. The first player must match the face/number or pick a card.
The game ends if a player legally plays all the cards they have left in one move.
I have no idea how long this will take but I aim to finish it, however long it takes. This is the Repo
I have some issues open already just to help me keep track of my own work, but if anyone is willing to help, they can make a pr. I will outline how the PRs are to be made.
This is just the beginning.