Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the code in c# i would appreciate if you do it. is played. 1. The deck is shuffled, and nine cards are dealt face

write the code in c# image text in transcribed
image text in transcribed
i would appreciate if you do it.
is played. 1. The deck is shuffled, and nine cards are dealt "face up" from the deck to the board. 2. Then the following sequence of steps is repeated: a. The player removes each pair of cards (A, 2, ..., 10) that total 11, e.g., an 8 and a 3, or a 10 and an A. An ace is worth 1, and suits are ignored when determining cards to remove. b. Any triplet consisting of a ), a Q, and a K is also removed by the player. Suits are also ignored when determining which cards to remove. C. Cards are dealt from the deck if possible to replace the cards just removed. The game is won when the deck is empty and no cards remain on the table. Here's a sample game, in which underlined cards are replacements from the deck. Cards on the Table Explanation KA 10 J4 24. 2 9. 3 54 5 initial deal KA 10 J4 Z 2 QA 3 5A 5. after remove 24 (either 2 would work) and 9 AA 10 94 7.2 743 5A 5. after remove J4 QA KA AA 10. 10A 7. 34 74 3 54 5 after remove 94 and 2 (removing A and 10. would have been legal here too) 2A 10 9A 7. 34 N 74 3 54 5 after remove A and 10 A (10. could have been removed instead) AL 10 K. 76 34 74 3 54 5 after remove 24 and 94 KK. 7. 34 74 3 54 5 after remove A+ and 10 K+ K. 7. 34 74 354 Q. after remove 6 and one of the 5s; no further plays are possible; game is lost. Questions: 1. List all possible plays for the board 5* 4 2. 64 AA J K 54 2* 2. Discuss the game with your team member and list the user requirement of the game, which specifies what the user expects the game to be able to do. for example: a. the game needs to determine if the game terminates, win or lost; b. the game needs to find matched cards; and so on. 3. Write algorithms of the above user requirements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

Students also viewed these Databases questions