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