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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started