-
Need help
I have to make the game "War" for my computer science class. We were instructed to use arrays to accomplish this. Once a card from one deck is used, how would I add it to the other persons deck/remove it from mine?
The name of the deck array is playerDeck.
To output a card I have been doing:
System.out.println ("Your card is the " + playerDeck.deck[c]);
c gets incremented by one each time through the while loop.
Let's say that I lose, that the opponents card is higher, how would I remove card "c" from the playerDeck array and add it to the opponents deck array, called compDeck?
I know I am new here, but I appreciate any help in this matter.
-
Moderators: please close this cross-post.
-
rideexpedition, this is a forum not a coda bank, or no one here wants to do your homework. Please show your attempt first. If you stuck on something we can help you.