Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do this program Here is how the game is played: 1) There is one deck of 100 cards. Each has a value 0-10. 2)

Please do this program image text in transcribed
Here is how the game is played: 1) There is one deck of 100 cards. Each has a value 0-10. 2) There must be two players. 3) Each player draws a card off the "front" of the deck. 4) Here is a list of the a's and what happens 0 - minus 10 points, turn is over 1 - gets the one point and draws again 2 - gets the 2 points, random card is put at the "back" of the deck, turn is over 3 through 10-the player get the points, but the num is over 5) First player to 100 wins Add another 100 cards, if the deck of cards run out) Must use a queue to represent the deck of cards Must use random E function and build the queue using addQueue() function Be sure to include comments Use meaningful identifier names (constants where appropriate) Do not work together, no two people should have identical work Turn in app file (select the "print' command from bloodshed) Turn in a "print-screen" of your output (press 'print-screen' on keyboard, then 'paste in MS Word) Start Game Player 1 - 0 Player 2 - 0 Player 1 turn Player 1 draws 2 Card with random value placed on top of the deck End of Player 1 turn Player 1 - 2 Player 2 - 0 Player 2 turn Player 2 draws a 1 - 2 Player 2 - 1 Player 2 Player 2 picked a 1, thus draws again Player 2 draws a 10 End of Player 2tum Player 1 - 2

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions

Question

Collaborate on a letter making your case to the professor.

Answered: 1 week ago

Question

3. What information do participants need?

Answered: 1 week ago