예제 #1
0
 private void waitForNewRound() {
   player.doneWithRound();
   synchronized (waitObject) {
     if (!model.checkEndRound()) {
       try {
         waitObject.wait();
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
     }
     waitObject.notifyAll();
   }
   player.newRound();
 }
예제 #2
0
 private void removePlayer() {
   model.removePlayer(player);
   if (model.checkEndRound()) {
     notifyWaiters();
   }
 }