projet-genie-logiciel-systeme/runtime-workspace/fr.n7.game.examples/src-gen/ConditionConnaissance.java
2021-12-09 18:54:08 +01:00

22 lines
514 B
Java

public class ConditionConnaissance implements ConditionTest {
Connaissance connaissance;
Boolean negation;
public ConditionConnaissance(
Connaissance connaissance,
Boolean negation) {
this.connaissance = connaissance;
this.negation = negation;
}
public Boolean evaluer() {
if (Jeu.explorateur.connaissances.contains(this.connaissance)) {
return !this.negation;
} else {
return this.negation;
}
}
}