projet-genie-logiciel-systeme/enigme.java/Condition.java
2021-12-04 15:59:35 +01:00

25 lines
511 B
Java

import java.util.List;
import java.util.ArrayList;
public class Condition {
List<ConditionEt> conditionEts;
public Condition(ConditionEt... conditionEts) {
this.conditionEts = new ArrayList<>();
for (ConditionEt c : conditionEts) {
this.conditionEts.add(c);
}
}
public Boolean evaluer() {
for (ConditionEt cond : conditionEts) {
if (cond.evaluer()) {
return true;
}
}
return false;
}
}