question archive "The child's card game War consists of two players each having a deck of cards

"The child's card game War consists of two players each having a deck of cards

Subject:Computer SciencePrice:4.87 Bought7

"The child's card game War consists of two players each having a deck of cards. For each play, each person turns over the top card in his or her deck. The higher card wins that round of play and the winner takes Bothe cards. The game continues until one person has all the cards and the other has none.How would I do a program to simulate a game of war. The computer will play both hands as player one and player two, and for each round will generate two random numbers and compare them. if the first number is higher PlayerOne's score is increased by 1 and if the second number is higher the second player's score is increased. When one player reaches a score of 10 that player should be declared the winner. The range of numbers should be 1-13 to simualate values of cards in the deck. It's supposed to be in a hierarchy chart and a raptor flowchart.

 

Option 1

Low Cost Option
Download this past answer in few clicks

4.87 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 7 times

Completion Status 100%