2b4b5433b7
Co-authored-by: gdamms <gdamms@users.noreply.github.com>
20 lines
483 B
Java
20 lines
483 B
Java
public class ConditionConnaissance implements ConditionTest {
|
|
|
|
Connaissance connaissance;
|
|
Boolean negation;
|
|
|
|
public ConditionConnaissance(String 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;
|
|
}
|
|
}
|
|
|
|
}
|