2021-12-01 08:48:38 +00:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2021-11-30 19:49:01 +00:00
|
|
|
public class Jeu {
|
2021-11-30 22:02:55 +00:00
|
|
|
public static Explorateur explorateur;
|
2021-11-30 19:49:01 +00:00
|
|
|
Territoire territoire;
|
2021-12-01 07:58:07 +00:00
|
|
|
List<Objet> objets;
|
|
|
|
List<Connaissance> connaissances;
|
|
|
|
List<Personne> personnes;
|
|
|
|
List<Transformation> transformations;
|
2021-11-30 19:49:01 +00:00
|
|
|
|
|
|
|
public Jeu(
|
|
|
|
Territoire territoire,
|
2021-12-01 07:58:07 +00:00
|
|
|
List<Objet> objets,
|
|
|
|
List<Connaissance> connaissances,
|
|
|
|
List<Personne> personnes,
|
|
|
|
List<Transformation> transformations) {
|
2021-11-30 19:49:01 +00:00
|
|
|
this.territoire = territoire;
|
|
|
|
this.objets = objets;
|
|
|
|
this.connaissances = connaissances;
|
|
|
|
this.personnes = personnes;
|
|
|
|
this.transformations = transformations;
|
|
|
|
}
|
2021-12-01 08:48:38 +00:00
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
Condition faux = new Condition(new ConditionEt(new ConditionBoolean(false)));
|
|
|
|
Condition vraie = new Condition(new ConditionEt(new ConditionBoolean(true)));
|
|
|
|
|
|
|
|
int explorateur_tailleInventaire = 3;
|
|
|
|
List<Objet> explorateur_inventaire = new ArrayList<>();
|
|
|
|
List<Connaissance> explorateur_connaissances = new ArrayList<>();
|
|
|
|
Jeu.explorateur = new Explorateur(
|
|
|
|
explorateur_tailleInventaire,
|
|
|
|
explorateur_inventaire,
|
|
|
|
explorateur_connaissances);
|
|
|
|
|
|
|
|
List<Lieu> lieux = new ArrayList<>();
|
|
|
|
|
|
|
|
List<Personne> debut_personnes = new ArrayList<>();
|
|
|
|
List<Description> debut_descriptions = new ArrayList<>();
|
|
|
|
List<Objet> debut_objets = new ArrayList<>();
|
|
|
|
List<Connaissance> debut_connaissances = new ArrayList<>();
|
|
|
|
|
|
|
|
List<Interaction> sphinx_interactions = new ArrayList<>();
|
|
|
|
|
|
|
|
List<Action> sphinx_interactions_actions = new ArrayList<>();
|
|
|
|
|
|
|
|
Action action_reussite = new Action(
|
|
|
|
vraie,
|
|
|
|
new ArrayList<>().add("Réussite"),
|
|
|
|
new ArrayList<>(),
|
|
|
|
new ArrayList<>(),
|
|
|
|
vraie);
|
|
|
|
|
|
|
|
sphinx_interaction_actions.add(action_reussite);
|
|
|
|
|
|
|
|
Action action_echec = new Action(
|
|
|
|
vraie,
|
|
|
|
new ArrayList<>(),
|
|
|
|
new ArrayList<>(),
|
|
|
|
new ArrayList<>().add("tentative"),
|
|
|
|
vraie);
|
|
|
|
|
|
|
|
sphinx_interaction_actions.add(action_echec);
|
|
|
|
|
|
|
|
Interaction sphinx_interaction = new Interaction(
|
|
|
|
vraie,
|
|
|
|
new ArrayList<>(),
|
|
|
|
new ArrayList<>(),
|
|
|
|
sphinx_interactions_actions);
|
|
|
|
sphinx_interactions.add(sphinx_interaction);
|
|
|
|
|
|
|
|
Personne sphinx = new Personne(
|
|
|
|
"Sphinx",
|
|
|
|
vraie,
|
|
|
|
vraie,
|
|
|
|
sphinx_interactions);
|
|
|
|
|
|
|
|
debut_personnes.add(sphinx);
|
|
|
|
|
|
|
|
Lieu debut = new Lieu(
|
|
|
|
"Départ",
|
|
|
|
faux,
|
|
|
|
vraie,
|
|
|
|
faux,
|
|
|
|
debut_personnes,
|
|
|
|
debut_descriptions,
|
|
|
|
debut_objets,
|
|
|
|
debut_connaissances);
|
|
|
|
|
|
|
|
lieux.add(debut);
|
|
|
|
|
|
|
|
Territoire territoire = new Territoire(
|
|
|
|
lieux,
|
|
|
|
chemins);
|
|
|
|
|
|
|
|
Jeu jeu = new Jeu();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-11-30 22:02:55 +00:00
|
|
|
}
|