Advertisement
marvk

Untitled

Oct 12th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. while (player1.size()>0&&player2.size()>0) {
  2.     i++;
  3.     Card p1 = player1.removeFirst();
  4.     Card p2 = player2.removeFirst();
  5.     if(p1.value > p2.value) {
  6.         player1.addLast(p1);
  7.         player1.addLast(p2);
  8.     } else if (p1.value < p2.value) {
  9.         player2.addLast(p1);
  10.         player2.addLast(p2);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement