projet-genie-logiciel-systeme/runtime-workspace/fr.n7.game.examples/src-gen/Personne.java
2022-01-18 23:29:53 +01:00

38 lines
841 B
Java

import java.util.List;
import java.io.BufferedReader;
public class Personne {
String nom;
Condition visible;
Condition obligatoire;
List<Interaction> interactions;
public Personne(
String nom,
Condition visible,
Condition obligatoire,
List<Interaction> interactions) {
this.nom = nom;
this.visible = visible;
this.obligatoire = obligatoire;
this.interactions = interactions;
}
void interragir(BufferedReader reader) {
Jeu.clearScreen();
System.out.println(this);
for (Interaction i : this.interactions) {
if (i.visible.evaluer()) {
i.interragir(reader);
}
break;
}
}
@Override
public String toString() {
return nom;
}
}