prise en compte diff IA
This commit is contained in:
@@ -25,7 +25,7 @@ public class Configuration {
|
||||
Couple c = nomsJoueurs.get(i);
|
||||
|
||||
if(c.isIa()) {
|
||||
joueurs.put(i,new JoueurVirtuel(c.getNom()));
|
||||
joueurs.put(i,new JoueurVirtuel(c.getNom(),c.getLvlIa()));
|
||||
}else {
|
||||
joueurs.put(i,new Joueur(c.getNom()));
|
||||
}
|
||||
|
||||
@@ -16,6 +16,11 @@ public class JoueurVirtuel extends Joueur {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public JoueurVirtuel(String nom, int lvlIa) {
|
||||
super(nom);
|
||||
nvDifficulte = lvlIa;
|
||||
}
|
||||
|
||||
public Effet choisirEffet(List<Effet> effets) {
|
||||
return effets.get((int) Math.floor(Math.random() * effets.size()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user