2021-12-01 19:55:46 +00:00
|
|
|
import java.util.List;
|
|
|
|
|
2021-11-30 22:02:55 +00:00
|
|
|
public class Chemin {
|
|
|
|
Lieu lieuIn;
|
|
|
|
Lieu lieuOut;
|
2021-12-01 19:55:46 +00:00
|
|
|
Condition ouvert;
|
|
|
|
Condition visible;
|
|
|
|
Condition obligatoire;
|
2021-12-01 07:58:07 +00:00
|
|
|
List<Connaissance> connaissancesRecus;
|
|
|
|
List<Objet> objetsRecus;
|
|
|
|
List<Objet> objetsConso;
|
|
|
|
List<Description> descriptions;
|
2021-11-30 22:02:55 +00:00
|
|
|
|
|
|
|
public Chemin(
|
|
|
|
Lieu lieuIn,
|
|
|
|
Lieu lieuOut,
|
2021-12-01 19:55:46 +00:00
|
|
|
Condition ouvert,
|
|
|
|
Condition visible,
|
|
|
|
Condition obligatoire,
|
2021-12-01 07:58:07 +00:00
|
|
|
List<Connaissance> connaissancesRecus,
|
|
|
|
List<Objet> objetsRecus,
|
|
|
|
List<Objet> objetsConso,
|
|
|
|
List<Description> descriptions) {
|
2021-11-30 22:02:55 +00:00
|
|
|
this.lieuIn = lieuIn;
|
|
|
|
this.lieuOut = lieuOut;
|
|
|
|
this.ouvert = ouvert;
|
|
|
|
this.visible = visible;
|
|
|
|
this.obligatoire = obligatoire;
|
|
|
|
this.connaissancesRecus = connaissancesRecus;
|
|
|
|
this.objetsRecus = objetsRecus;
|
|
|
|
this.objetsConso = objetsConso;
|
|
|
|
this.descriptions = descriptions;
|
|
|
|
|
|
|
|
}
|
2021-12-01 19:55:46 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
for (Description d : descriptions) {
|
|
|
|
if (d.condition.evaluer()) {
|
|
|
|
return d.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "No desc";
|
|
|
|
}
|
2021-11-30 22:02:55 +00:00
|
|
|
}
|