The game was made using memory allocation, pointers, sorting algorythems and by using C random function.
Each player follows the preceding card, laid on the deck, with a card of the same color or figure.
The object of the game is to discard all the cards in your hand.
- Stop - The next player loses their turn.
- Plus - Forces the user to play again. If the player cannot play another card he must draw.
- Switch Direction - Reverses the direction of the play.
- Switch Color - Allows the user to determine the color to be played by the next player.
- TAKI – Allows a player to follow with all the cards of the same color as the TAKI card.
At the start of the game, you will get the following screen.
Enter the number of players that will play the game:
You will be asked to enter the name of each player.
This will also set the order of the players' turns:
Now the game will start.
You will see the current card on top of the deck, and the cards of the player currently playing.
You will get a prompt to choose which card to put on top of the deck, or to draw a new card:
If a player choses to put a COLOR card, which he can put on any card in the deck,
he will get to choose which color the card will take:
The chosen color will now show at the top of the deck:
When a player drops all of his cards, the game will be finished.
A winning message will be shown, followed by the statistics of the game.
The statistics will show frequency of each card dropped in the game:
-
The TAKI card will allow the play to drop any card that is the same color as the TAKI card,
until he choses to draw a new card from the deck, or he finished all of his cards and won the game. -
The STOP card will skip the next player's turn,
the next turn will be of the player that is after that player. -
The SWITCH DIRECTION card will switch the direction of the turns,
the player that player before the current player will get the next turn. -
The PLUS card forces the user to play again.
If the player cannot play another card he must draw a new card.
Credit for the README file: @Idan-sh