2021-12-01 19:55:46 +00:00
|
|
|
import java.util.List;
|
2021-12-02 13:23:06 +00:00
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.io.BufferedReader;
|
2021-12-01 19:55:46 +00:00
|
|
|
|
2021-11-30 19:49:01 +00:00
|
|
|
public class Personne {
|
|
|
|
String nom;
|
|
|
|
Condition visible;
|
|
|
|
Condition obligatoire;
|
2021-12-01 19:55:46 +00:00
|
|
|
List<Interaction> interractions;
|
2021-11-30 19:49:01 +00:00
|
|
|
|
|
|
|
public Personne(
|
|
|
|
String nom,
|
|
|
|
Condition visible,
|
|
|
|
Condition obligatoire,
|
2021-12-01 19:55:46 +00:00
|
|
|
List<Interaction> interractions) {
|
2021-11-30 19:49:01 +00:00
|
|
|
this.nom = nom;
|
|
|
|
this.visible = visible;
|
|
|
|
this.obligatoire = obligatoire;
|
|
|
|
this.interractions = interractions;
|
|
|
|
}
|
2021-12-02 13:23:06 +00:00
|
|
|
|
|
|
|
void interragir(BufferedReader reader, Lieu lieu) {
|
|
|
|
for (Interaction i : this.interractions) {
|
|
|
|
if (i.visible.evaluer()) {
|
|
|
|
i.interragir(reader, lieu);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return nom;
|
|
|
|
}
|
2021-11-30 19:49:01 +00:00
|
|
|
}
|