Question: (Object Oriented Java Program) War Simulation! Objective: Write a program in which simulates a card game of WAR! The game is simple. There are two

(Object Oriented Java Program)

War Simulation!

Objective:

Write a program in which simulates a card game of WAR! The game is simple. There are two players who each are dealt out 15 cards. Each player lays down a card one at a time. The player with highest value on the card wins both cards back. The player who runs out of cards loses. If they draw the same number, they draw an additional two cards to see who would win. Cards are stored in two stacks per player. One for the cards they are playing with and another for storing the cards they have won.

In this version of the game we will not be using standard playing cards, but instead cards that have unique values ranging from 1-10. This will make the simulation simpler and quicker. The game is played in a "best of" series (The user is asked what they want the best of amount to be, it can be either 3, 5, or 7).

Also remember this program is a simulation of two players playing the game so there is no user input besides whether or not to run another "best of" series again.

Required Methodology

You must use either Java's built in stack implementation or your own stack frame.

Please comment if you have a question.

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!