projet-genie-logiciel-systeme/enigme.java/Condition.java

25 lines
511 B
Java
Raw Normal View History

2021-12-01 19:55:46 +00:00
import java.util.List;
import java.util.ArrayList;
public class Condition {
List<ConditionEt> conditionEts;
2021-12-04 14:59:35 +00:00
public Condition(ConditionEt... conditionEts) {
2021-12-01 19:55:46 +00:00
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;
}
}