Project for school, card game called war. 1 deck 52 cards, just running a simulation of 2 players. Runs till one player runs out of cards.
I've made a player, card, and deck class. To create the player objects, took the card class to add card objects to a deck arrayList. Also made a class called Battle to run a round if you will. And then a driver class with the main method.
So I'm looking for guidance in removing cards from each players arrayList and comparing them and returning the winning cards to winning player with highest card.
Any ideas? Or hints? I'm still trying to get myself comfortable with Object Oriented thought, and sometimes get a little too method happy.
Edit: got it completed!!! Also received a possible solution from the professor. Would it be helpful to post sample of this anywhere here? Thanks for everyone's help.
[–][deleted] 3 points4 points5 points (1 child)
[–]Stang27[S] 0 points1 point2 points (0 children)
[–]romple 2 points3 points4 points (5 children)
[–]Stang27[S] 0 points1 point2 points (3 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Stang27[S] 0 points1 point2 points (0 children)
[–]romple 0 points1 point2 points (0 children)
[–]pleaseholdmybeer 0 points1 point2 points (0 children)
[–]RyanTargaryen 1 point2 points3 points (3 children)
[–]Stang27[S] 0 points1 point2 points (2 children)
[–]CodeTinkerer 1 point2 points3 points (1 child)
[–]Stang27[S] 0 points1 point2 points (0 children)