Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (player1.size()>0&&player2.size()>0) {
- i++;
- Card p1 = player1.removeFirst();
- Card p2 = player2.removeFirst();
- if(p1.value > p2.value) {
- player1.addLast(p1);
- player1.addLast(p2);
- } else if (p1.value < p2.value) {
- player2.addLast(p1);
- player2.addLast(p2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement