Your task is to make a modified game of the card game war. In essence there will be one deck that has card values stored in it. That deck will get delt out to the user and the computer so each have an even number of cards. When the battle button is clicked, the user and the pc will display their first cards. Whoever has the higher value on their card will get to keep both cards. If there is a tie between the user and the pc those cards will be taken out of the decks. Once one player has no more cards in their hands the game is over.
Here is an example of what your program should look like when it is complete:
Part of this code uses a loop which we have not done yet. Please just remix this code to have the function of dealing out the cards done for you!
Make Sure You Use
- A List or Array
- Functions with parameters
- Conditional Statements