projet-genie-logiciel-systeme/enigme.java/Condition.java
Laureηt 2b4b5433b7
feat: ajout du java
Co-authored-by: gdamms <gdamms@users.noreply.github.com>
2021-11-30 23:02:55 +01:00

21 lines
432 B
Java

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;
}
}