Afficher piocher une carte

This commit is contained in:
Yessine-iut
2020-05-12 15:56:10 +02:00
parent 83c080f719
commit 697a35679c
3 changed files with 60 additions and 8 deletions

View File

@@ -241,6 +241,36 @@ public class GestionnaireJeu {
}
}
public Type choisirCarte(Joueur joueur) {
Platform.runLater(() -> {
try {
pc.afficherPiocher(joueur);
} catch (IOException e) {
e.printStackTrace();
}
});
this.waitPlateau();
final FutureTask<Type> query = new FutureTask<Type>(new Callable<Type>() {
@Override
public Type call() throws Exception {
return pc.getChoixCarte(joueur);
}
});
Platform.runLater(query);
try {
return query.get();
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
return null;
}
public void rollDice(Joueur joueur, int typeDice, int ... rolls){
pc.rollDice(joueur,typeDice,rolls);