Capacite personnage thread

This commit is contained in:
Paul Gross
2020-05-13 10:28:02 +02:00
parent d8df8f3833
commit 80f7266ffb
4 changed files with 46 additions and 6 deletions

View File

@@ -226,9 +226,10 @@ public class GestionnaireJeu {
return null;
}
public void waitPlateau() {
synchronized(plateau) {
Thread currentThread = Thread.currentThread();
synchronized(currentThread) {
try {
plateau.wait();
currentThread.wait();
} catch (InterruptedException e) {
}

View File

@@ -272,6 +272,12 @@ public class Joueur {
}
public void utiliserCapacite() {
if(revele) {
this.cartePersonnage.utiliser();
}
}