Question: Question War (Raptor Program) USE A RAPTOR TO SOLVE IT Use your knowledge of algorithm development to create a program using Raptor to solve the

Question War (Raptor Program)

USE A RAPTOR TO SOLVE IT Use your knowledge of algorithm development to create a program using Raptor to solve the problem below. The childs 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 both cards. The game continues until one person has all the cards and the other has none. Create a program that simulates a modified game of War.

The computer will play both hands, as PlayerOne and PlayerTwo, and, for each round will generate two random numbers and compare them.

If the first number is higher, PlayerOnes score is increased by 1 and if the second number is higher, PlayerTwos score is increased by 1.

If there is a tie, no score is incremented.

When one player reaches a score of 10, that player should be deemed the winner and the game ends.

The range of numbers should be 1-13 to simulate the values of cards in the deck.

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!