SHARE
TWEET

Untitled

marvk Oct 12th, 2015 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top