Question: solve this exam using C# as language of programming : Use the appropriate concepts ( class , struct , interface ) to implement a deck
solve this exam using C# as language of programming :
Use the appropriate concepts class struct interface to implement a deck of cards.
Values : Ace,jack,queen,king.
Suits: clubs,hearts,diamonds,spiders. A card has a value and a color that will determine its name.
A complete deck call pair of cards all simple combination possible contains cards Now we want to play a game of fishing pioche a deck of cards A game can be with players Plsyers are people with a firstnsme lastname and id Each player has a hand that can hold maximum cards. To start a game you will have to deal the same number of cards between and randomly to every player The rest of cards are placed on the pile of cards called draws" on the game table
When the game starts :
A player is randomly chosen to start the game by placing an open card on the table in the stack named deposit
The next player must place a card of the same suit or value on the pile of deposit
Otherwise he will have to draw a card from the pile of draw and his turn moves on to the next one
When the pile of draws finished the mixedpile will be reused as a stack of picks
Card specifica :
The jack allows you to change color and can be dropped to any value or suit that is on the deposit pile expect on a
The Ace once placed on the deposit pile the next player has his turn skipped
The allows you to change the direction of game.
The forces the next player to draw cards, this attack only affects the next player and his turn is skipped The player can counter this attack if they have so the attack cancels
When player finishes his cards win the game
questions :
Implements all the concept of the domain and their types types can be : class struct interface enum card must be a struct color, value player person cardPair tableGame, fishingGame, piledepioche, pilededepot
Implement the pair of cards
Implement the game of fishing has :
lunch and log console.WriteLine a game that is played with players. Deal the cards randomly and choose the first player At each player's turn use the observer pattern display the payer whow played and the card they played, The last card on deposit pile Signal the end of game and the winner Delay treatements with delay and await Play must be done automatically
Knowing that the Ace count for points jack queen and king count for points and the other card count for their face values
Calculate the balance sheet of each player at the end of game when a player finishes
Implement a strategy that minimizes the countdown of point at the end of the game When a player has only one card left all players must be notified and adapt their strategy Randomly apply this strategy to a player
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
