Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

VBA Excel The card game War consists of two players who each have a deck of cards. For each hand, each player turns over the

VBA Excelimage text in transcribed

The card game War consists of two players who each have a deck of cards. For each hand, each player 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. Create a program that simulates a modified game of War. The computer will play both hands, as Player One and Player Two. For each round the program will generate two random numbers and compare them. If the first number is higher, Player One's score is increased by 1 and if the second is higher, Player Two'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 is deemed the winner and the game ends. The range of numbers should be 1-13 to simulate the values of cards in a deck. Display on a worksheet the hand number, Player One's card, Player Two's card, Player One's score, and Player Two's score for the entire game

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago