In this lab, you'll create the classic, almost completely brain-dead game of War. You split a deck of cards evenly between two players and both play the top card in your hand. Whoever plays the higher card takes the two cards and adds them to their discard pile. When you run out of cards, reshuffle your discard back into your hand and keep going. When one player has all the cards, they win the game. For even more simplicity, in our version if there is a tie, the two cards are thrown out.
Here is example output:
To implement this game, you'll be working with a number of functions with arrays. The "cards" only need to be integer values, and the deck, hands and discard piles can all be arrays of ints.
This lab08_war.cpp file has the game already broken down into functions. It's your job to complete those functions to finish the game. In order to do so efficiently, you should:
.cpp
file to understand the structure of the program..cpp
file of your own.