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

21 lines
432 B
Java
Raw Normal View History

public class Condition {
String condition;
ConditionEt[] conditionEts;
public Condition(String condition, ConditionEt[] conditionEts) {
this.condition = condition;
this.conditionEts = conditionEts;
}
public Boolean evaluer() {
for (ConditionEt cond : conditionEts) {
if (cond.evaluer()) {
return true;
}
}
return false;
}
}