36 lines
901 B
Java
36 lines
901 B
Java
import java.util.List;
|
|
|
|
public class Interaction {
|
|
Condition visible;
|
|
List<Connaissance> connaissances;
|
|
List<Objet> objetsRecus;
|
|
List<Objet> objetsConso;
|
|
List<Action> actions;
|
|
|
|
public Interaction(
|
|
Condition visible,
|
|
List<Connaissance> connaissances,
|
|
List<Objet> objetsRecus,
|
|
List<Objet> objetsConso,
|
|
List<Action> actions) {
|
|
this.visible = visible;
|
|
this.connaissances = connaissances;
|
|
this.objetsRecus = objetsRecus;
|
|
this.objetsConso = objetsConso;
|
|
this.actions = actions;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
String res = "Interraction :";
|
|
int k = 0;
|
|
for (Action a : this.actions) {
|
|
if (a.visible.evaluer()) {
|
|
res += "\n" + k + " " + a;
|
|
k++;
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
}
|