Question: C Programming - Game of UNO I need to code the card game UNO in C. I don't know how to set up the deck

C Programming - Game of UNO

I need to code the card game UNO in C. I don't know how to set up the deck for the game. I am told in my project rubric to have a "an UNO deck of cards being implemented as a linked list". Linked lists confuse me and I don't know what to do. If you could code a deck of UNO cards using a linked list, that would be awesome! You can see below what I am being asked of regarding on how to setup the deck.

C Programming - Game of UNO I need to code the card

2.1 Setup 1. UNO cards are represented as variables of the following type typedef atzuct carda t char awst [7) char action [15) struct card-S ept: card You are allowed to add attributes to this definition, but not to remove any. You can represent colors hy using card suits Red: hearts; Yellow: diamonds Green: clubs; Blue: spades. The action field is used to denote the function of action cards 2. The game is played using the following deck of cards Figure 1: The deck of UNO cards. The following action cards are included Reverse If going clockwise, switch to counterclockwise or vice versa . Skip - When a player places this card, the next player has to skip their turn. If turned up at the beginning. the first player loeses his/her turn Draw Two When a person places this card, the next player will have to pick up two cards and forfeit his/her turn by Dmitry Fomin btt/co.iedia.crg/w/Lndez.papeurd-2362748. Wild - This card represents all four colors, and can be placed on any card. The player has to state which color it will reprsent for the next player. It can be played regardless of whether another card is available Wild Draw Four - This acts just like the wild card except that the next player also has to draw four cards as well as forfeit his/her turn. With this card,ymust have no other alternative cards to play that matches the color of the card previously played. If you play this card illegally, you may be challenged by the ather player to show your hand to him/her. If guilty, yaa need to draw cards. If not, the challenger eeds to draw 6 cards instead 3. At the beginning, the user can choose to shuffle the deck or load a predefined sequence of cards fron a ile (or testing) 4. The deck is implemented by a dynamic list of cards. The cards drawnm from the deck are deeted froan the ist 5. Each player's hand is implemented by a dynamic list ocards. The lEst i initially populated with the cards dealt to each player. The card drawn (played) by each player is added to (deleted from) the respective list. 6. The discard pile is implemented by a dynamic list. The discard pile is shuied if the draw pale is exhausted and the game has not ended. Only the top ive cards of the discard pile are shown on scre

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!