subject
Computers and Technology, 18.03.2021 01:40 mya1318

The child’s 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, PlayerOne’s score is increased by 1 and if the second number is higher, PlayerTwo’s 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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 14:00
Mr. johnson creates a game in which the players see the world from their avatar’s perspective. what genre of game is this?
Answers: 2
question
Computers and Technology, 21.06.2019 16:00
Ramon is graphing the function  f(x) = 3(4)x. he begins by plotting the initial value. which graph represents his initial step?
Answers: 2
question
Computers and Technology, 21.06.2019 16:00
Page orientation can be either landscape or
Answers: 1
question
Computers and Technology, 21.06.2019 22:30
Provide an example of a project that combines the three principles of lean six sigma with business project management (bpm) and services oriented architecture (soa). identify the elements of the project that comply with each of three principles.
Answers: 1
You know the right answer?
The child’s game, War, consists of two players each having a deck of cards. For each play, each pers...
Questions
question
Physics, 09.04.2020 20:28
question
Chemistry, 09.04.2020 20:28
question
History, 09.04.2020 20:28
question
Mathematics, 09.04.2020 20:28
question
Spanish, 09.04.2020 20:28
Questions on the website: 13722363