fix: suppression de vieux trucs
This commit is contained in:
parent
9a145618c7
commit
4bea520e72
|
@ -1,666 +0,0 @@
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class Prototype {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
// "Objets"
|
|
||||||
|
|
||||||
List<Objet> jeu_objets = new ArrayList<>();
|
|
||||||
Map<String, Objet> jeu_objets2 = new HashMap<>();
|
|
||||||
|
|
||||||
List<Description> objet_warpToken_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
objet_warpToken_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"warpToken description",
|
|
||||||
new Condition(null)));
|
|
||||||
|
|
||||||
|
|
||||||
Objet objet_warpToken = new Objet(
|
|
||||||
"warpToken",
|
|
||||||
1,
|
|
||||||
objet_visible_warpToken_condition,
|
|
||||||
objet_warpToken_descriptions);
|
|
||||||
jeu_objets2.put("test", objet_warpToken);
|
|
||||||
|
|
||||||
List<Description> objet_warpTicket_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> objet_warpTicket_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> objet_warpTicket_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
objet_warpTicket_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
objet_warpTicket_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(objet_warpTicket_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition objet_warpTicket_description_1_condition = new Condition(
|
|
||||||
objet_warpTicket_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
objet_warpTicket_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"warpTicket description",
|
|
||||||
objet_warpTicket_description_1_condition));
|
|
||||||
List<ConditionEt> objet_visible_warpTicket_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> objet_visible_warpTicket_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
objet_visible_warpTicket_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
objet_visible_warpTicket_conditions_ET_list.add(
|
|
||||||
new ConditionEt(objet_visible_warpTicket_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition objet_visible_warpTicket_condition = new Condition(objet_visible_warpTicket_conditions_ET_list);
|
|
||||||
Objet objet_warpTicket = new Objet(
|
|
||||||
"warpTicket",
|
|
||||||
1,
|
|
||||||
objet_visible_warpTicket_condition,
|
|
||||||
objet_warpTicket_descriptions);
|
|
||||||
jeu_objets.add(objet_warpTicket);
|
|
||||||
List<Description> objet_warpReceipt_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> objet_warpReceipt_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> objet_warpReceipt_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
objet_warpReceipt_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
objet_warpReceipt_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(objet_warpReceipt_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition objet_warpReceipt_description_1_condition = new Condition(
|
|
||||||
objet_warpReceipt_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
objet_warpReceipt_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"warpReceipt description",
|
|
||||||
objet_warpReceipt_description_1_condition));
|
|
||||||
List<ConditionEt> objet_visible_warpReceipt_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> objet_visible_warpReceipt_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
objet_visible_warpReceipt_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
objet_visible_warpReceipt_conditions_ET_list.add(
|
|
||||||
new ConditionEt(objet_visible_warpReceipt_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition objet_visible_warpReceipt_condition = new Condition(objet_visible_warpReceipt_conditions_ET_list);
|
|
||||||
Objet objet_warpReceipt = new Objet(
|
|
||||||
"warpReceipt",
|
|
||||||
1,
|
|
||||||
objet_visible_warpReceipt_condition,
|
|
||||||
objet_warpReceipt_descriptions);
|
|
||||||
jeu_objets.add(objet_warpReceipt);
|
|
||||||
|
|
||||||
// "Connaissances"
|
|
||||||
|
|
||||||
List<Connaissance> jeu_connaissances = new ArrayList<>();
|
|
||||||
|
|
||||||
// "Transformations"
|
|
||||||
|
|
||||||
List<Transformation> jeu_transformations = new ArrayList<>();
|
|
||||||
|
|
||||||
// "Explorateur"
|
|
||||||
|
|
||||||
List<Objet> explorateur_inventaire = new ArrayList<>();
|
|
||||||
explorateur_inventaire.add(objet_warpTicket);
|
|
||||||
|
|
||||||
List<Connaissance> explorateur_connaissances = new ArrayList<>();
|
|
||||||
|
|
||||||
Jeu.explorateur = new Explorateur(
|
|
||||||
5,
|
|
||||||
explorateur_connaissances,
|
|
||||||
explorateur_inventaire);
|
|
||||||
|
|
||||||
// "Personnes"
|
|
||||||
|
|
||||||
List<Personne> jeu_personnes = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> personne_visible_cashier_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_visible_cashier_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_visible_cashier_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_visible_cashier_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_visible_cashier_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_visible_cashier_1_condition = new Condition(personne_visible_cashier_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> personne_obligatoire_cashier_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_obligatoire_cashier_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_obligatoire_cashier_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
personne_obligatoire_cashier_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_obligatoire_cashier_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_obligatoire_cashier_1_condition = new Condition(
|
|
||||||
personne_obligatoire_cashier_1_conditions_ET_list);
|
|
||||||
List<Interaction> personne_cashier_1_interactions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_visible_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_visible_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_visible_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_visible_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_visible_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_visible_1_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_visible_1_conditions_ET_list);
|
|
||||||
List<Action> personne_cashier_1_interaction_1_actions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_visible_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_visible_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_visible_1_conditions_TEST_list.add(
|
|
||||||
new ConditionObjet(
|
|
||||||
objet_warpTicket,
|
|
||||||
"==",
|
|
||||||
1));
|
|
||||||
personne_cashier_1_interaction_1_action_visible_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_visible_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_visible_1_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_visible_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_fin_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_fin_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_fin_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_1_action_fin_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_fin_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_fin_1_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_fin_1_conditions_ET_list);
|
|
||||||
List<Description> personne_cashier_1_interaction_1_action_1_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_1_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_1_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_1_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_1_action_1_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_1_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_1_description_1_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_1_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_1_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"Acheter un ticket",
|
|
||||||
personne_cashier_1_interaction_1_action_1_description_1_condition));
|
|
||||||
|
|
||||||
List<Connaissance> personne_cashier_1_interaction_1_action_1_connaissances = new ArrayList<>();
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_action_1_objets_conso = new ArrayList<>();
|
|
||||||
personne_cashier_1_interaction_1_action_1_objets_conso.add(objet_warpTicket);
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_action_1_objets_recus = new ArrayList<>();
|
|
||||||
personne_cashier_1_interaction_1_action_1_objets_recus.add(objet_warpToken);
|
|
||||||
personne_cashier_1_interaction_1_action_1_objets_recus.add(objet_warpReceipt);
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_actions.add(
|
|
||||||
new Action(
|
|
||||||
personne_cashier_1_interaction_1_action_visible_1_condition,
|
|
||||||
personne_cashier_1_interaction_1_action_fin_1_condition,
|
|
||||||
personne_cashier_1_interaction_1_action_1_connaissances,
|
|
||||||
personne_cashier_1_interaction_1_action_1_objets_recus,
|
|
||||||
personne_cashier_1_interaction_1_action_1_objets_conso,
|
|
||||||
personne_cashier_1_interaction_1_action_1_descriptions));
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_visible_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_visible_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_visible_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_1_action_visible_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_visible_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_visible_2_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_visible_2_conditions_ET_list);
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_fin_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_fin_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_fin_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_1_action_fin_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_fin_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_fin_2_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_fin_2_conditions_ET_list);
|
|
||||||
List<Description> personne_cashier_1_interaction_1_action_2_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> personne_cashier_1_interaction_1_action_2_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> personne_cashier_1_interaction_1_action_2_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_2_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
personne_cashier_1_interaction_1_action_2_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(personne_cashier_1_interaction_1_action_2_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition personne_cashier_1_interaction_1_action_2_description_1_condition = new Condition(
|
|
||||||
personne_cashier_1_interaction_1_action_2_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_action_2_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"Quitter",
|
|
||||||
personne_cashier_1_interaction_1_action_2_description_1_condition));
|
|
||||||
|
|
||||||
List<Connaissance> personne_cashier_1_interaction_1_action_2_connaissances = new ArrayList<>();
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_action_2_objets_conso = new ArrayList<>();
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_action_2_objets_recus = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interaction_1_actions.add(
|
|
||||||
new Action(
|
|
||||||
personne_cashier_1_interaction_1_action_visible_2_condition,
|
|
||||||
personne_cashier_1_interaction_1_action_fin_2_condition,
|
|
||||||
personne_cashier_1_interaction_1_action_2_connaissances,
|
|
||||||
personne_cashier_1_interaction_1_action_2_objets_recus,
|
|
||||||
personne_cashier_1_interaction_1_action_2_objets_conso,
|
|
||||||
personne_cashier_1_interaction_1_action_2_descriptions));
|
|
||||||
|
|
||||||
List<Connaissance> personne_cashier_1_interaction_1_connaissances = new ArrayList<>();
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_objets_conso = new ArrayList<>();
|
|
||||||
List<Objet> personne_cashier_1_interaction_1_objets_recus = new ArrayList<>();
|
|
||||||
|
|
||||||
personne_cashier_1_interactions.add(
|
|
||||||
new Interaction(
|
|
||||||
personne_cashier_1_interaction_visible_1_condition,
|
|
||||||
personne_cashier_1_interaction_1_connaissances,
|
|
||||||
personne_cashier_1_interaction_1_objets_conso,
|
|
||||||
personne_cashier_1_interaction_1_objets_recus,
|
|
||||||
personne_cashier_1_interaction_1_actions));
|
|
||||||
|
|
||||||
Personne personne_cashier = new Personne(
|
|
||||||
"cashier",
|
|
||||||
personne_visible_cashier_1_condition,
|
|
||||||
personne_obligatoire_cashier_1_condition,
|
|
||||||
personne_cashier_1_interactions);
|
|
||||||
|
|
||||||
jeu_personnes.add(personne_cashier);
|
|
||||||
|
|
||||||
// "Lieux"
|
|
||||||
|
|
||||||
List<Lieu> territoire_lieux = new ArrayList<>();
|
|
||||||
List<ConditionEt> lieu_deposable_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_deposable_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_deposable_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_deposable_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_deposable_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_deposable_1_condition = new Condition(lieu_deposable_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_depart_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_depart_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_depart_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_depart_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_depart_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_depart_1_condition = new Condition(lieu_depart_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_fin_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_fin_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_fin_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_fin_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_fin_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_fin_1_condition = new Condition(lieu_fin_1_conditions_ET_list);
|
|
||||||
List<Description> lieu_preWarp_1_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> lieu_preWarp_1_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_preWarp_1_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_preWarp_1_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_preWarp_1_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_preWarp_1_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_preWarp_1_description_1_condition = new Condition(
|
|
||||||
lieu_preWarp_1_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
lieu_preWarp_1_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"preWarp description",
|
|
||||||
lieu_preWarp_1_description_1_condition));
|
|
||||||
|
|
||||||
List<Personne> lieu_preWarp_1_personnes = new ArrayList<>();
|
|
||||||
lieu_preWarp_1_personnes.add(personne_cashier);
|
|
||||||
List<Objet> lieu_preWarp_1_objets = new ArrayList<>();
|
|
||||||
List<Connaissance> lieu_preWarp_1_connaissances = new ArrayList<>();
|
|
||||||
|
|
||||||
// TODO: utiliser un search dans la liste plutot que de déclarer les objets
|
|
||||||
Lieu lieu_preWarp = new Lieu(
|
|
||||||
"preWarp",
|
|
||||||
lieu_deposable_1_condition,
|
|
||||||
lieu_depart_1_condition,
|
|
||||||
lieu_fin_1_condition,
|
|
||||||
lieu_preWarp_1_personnes,
|
|
||||||
lieu_preWarp_1_descriptions,
|
|
||||||
lieu_preWarp_1_objets,
|
|
||||||
lieu_preWarp_1_connaissances);
|
|
||||||
|
|
||||||
territoire_lieux.add(lieu_preWarp);
|
|
||||||
List<ConditionEt> lieu_deposable_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_deposable_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_deposable_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_deposable_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_deposable_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_deposable_2_condition = new Condition(lieu_deposable_2_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_depart_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_depart_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_depart_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_depart_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_depart_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_depart_2_condition = new Condition(lieu_depart_2_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_fin_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_fin_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_fin_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_fin_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_fin_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_fin_2_condition = new Condition(lieu_fin_2_conditions_ET_list);
|
|
||||||
List<Description> lieu_postWarp_2_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> lieu_postWarp_2_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_postWarp_2_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_postWarp_2_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_postWarp_2_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_postWarp_2_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_postWarp_2_description_1_condition = new Condition(
|
|
||||||
lieu_postWarp_2_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
lieu_postWarp_2_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"postWarp description",
|
|
||||||
lieu_postWarp_2_description_1_condition));
|
|
||||||
|
|
||||||
List<Personne> lieu_postWarp_2_personnes = new ArrayList<>();
|
|
||||||
List<Objet> lieu_postWarp_2_objets = new ArrayList<>();
|
|
||||||
List<Connaissance> lieu_postWarp_2_connaissances = new ArrayList<>();
|
|
||||||
|
|
||||||
// TODO: utiliser un search dans la liste plutot que de déclarer les objets
|
|
||||||
Lieu lieu_postWarp = new Lieu(
|
|
||||||
"postWarp",
|
|
||||||
lieu_deposable_2_condition,
|
|
||||||
lieu_depart_2_condition,
|
|
||||||
lieu_fin_2_condition,
|
|
||||||
lieu_postWarp_2_personnes,
|
|
||||||
lieu_postWarp_2_descriptions,
|
|
||||||
lieu_postWarp_2_objets,
|
|
||||||
lieu_postWarp_2_connaissances);
|
|
||||||
|
|
||||||
territoire_lieux.add(lieu_postWarp);
|
|
||||||
List<ConditionEt> lieu_deposable_3_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_deposable_3_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_deposable_3_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_deposable_3_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_deposable_3_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_deposable_3_condition = new Condition(lieu_deposable_3_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_depart_3_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_depart_3_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_depart_3_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
lieu_depart_3_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_depart_3_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_depart_3_condition = new Condition(lieu_depart_3_conditions_ET_list);
|
|
||||||
List<ConditionEt> lieu_fin_3_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_fin_3_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_fin_3_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_fin_3_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_fin_3_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_fin_3_condition = new Condition(lieu_fin_3_conditions_ET_list);
|
|
||||||
List<Description> lieu_END_3_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> lieu_END_3_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> lieu_END_3_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
lieu_END_3_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
lieu_END_3_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(lieu_END_3_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition lieu_END_3_description_1_condition = new Condition(lieu_END_3_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
lieu_END_3_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"END description",
|
|
||||||
lieu_END_3_description_1_condition));
|
|
||||||
|
|
||||||
List<Personne> lieu_END_3_personnes = new ArrayList<>();
|
|
||||||
List<Objet> lieu_END_3_objets = new ArrayList<>();
|
|
||||||
List<Connaissance> lieu_END_3_connaissances = new ArrayList<>();
|
|
||||||
|
|
||||||
// TODO: utiliser un search dans la liste plutot que de déclarer les objets
|
|
||||||
Lieu lieu_END = new Lieu(
|
|
||||||
"END",
|
|
||||||
lieu_deposable_3_condition,
|
|
||||||
lieu_depart_3_condition,
|
|
||||||
lieu_fin_3_condition,
|
|
||||||
lieu_END_3_personnes,
|
|
||||||
lieu_END_3_descriptions,
|
|
||||||
lieu_END_3_objets,
|
|
||||||
lieu_END_3_connaissances);
|
|
||||||
|
|
||||||
territoire_lieux.add(lieu_END);
|
|
||||||
|
|
||||||
// "Chemins"
|
|
||||||
|
|
||||||
List<Chemin> territoire_chemins = new ArrayList<>();
|
|
||||||
List<ConditionEt> chemin_ouvert_Warp_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_ouvert_Warp_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_ouvert_Warp_1_conditions_TEST_list.add(
|
|
||||||
new ConditionObjet(
|
|
||||||
objet_warpToken,
|
|
||||||
">",
|
|
||||||
0));
|
|
||||||
chemin_ouvert_Warp_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_ouvert_Warp_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_ouvert_Warp_1_condition = new Condition(chemin_ouvert_Warp_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> chemin_visible_Warp_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_visible_Warp_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_visible_Warp_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
chemin_visible_Warp_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_visible_Warp_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_visible_Warp_1_condition = new Condition(chemin_visible_Warp_1_conditions_ET_list);
|
|
||||||
List<ConditionEt> chemin_obligatoire_Warp_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_obligatoire_Warp_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_obligatoire_Warp_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
chemin_obligatoire_Warp_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_obligatoire_Warp_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_obligatoire_Warp_1_condition = new Condition(chemin_obligatoire_Warp_1_conditions_ET_list);
|
|
||||||
List<Description> chemin_Warp_1_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> chemin_Warp_1_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_Warp_1_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_Warp_1_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionObjet(
|
|
||||||
objet_warpToken,
|
|
||||||
"==",
|
|
||||||
0));
|
|
||||||
chemin_Warp_1_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_Warp_1_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_Warp_1_description_1_condition = new Condition(chemin_Warp_1_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
chemin_Warp_1_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"Warp description (need token)",
|
|
||||||
chemin_Warp_1_description_1_condition));
|
|
||||||
List<ConditionEt> chemin_Warp_1_description_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_Warp_1_description_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_Warp_1_description_2_conditions_TEST_list.add(
|
|
||||||
new ConditionObjet(
|
|
||||||
objet_warpToken,
|
|
||||||
"==",
|
|
||||||
1));
|
|
||||||
chemin_Warp_1_description_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_Warp_1_description_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_Warp_1_description_2_condition = new Condition(chemin_Warp_1_description_2_conditions_ET_list);
|
|
||||||
|
|
||||||
chemin_Warp_1_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"Warp description (token acquired)",
|
|
||||||
chemin_Warp_1_description_2_condition));
|
|
||||||
|
|
||||||
List<Connaissance> chemin_Warp_1_connaissances = new ArrayList<>();
|
|
||||||
List<Objet> chemin_Warp_1_objets_recus = new ArrayList<>();
|
|
||||||
List<Objet> chemin_Warp_1_objets_conso = new ArrayList<>();
|
|
||||||
chemin_Warp_1_objets_conso.add(objet_warpToken);
|
|
||||||
|
|
||||||
Chemin chemins_Warp = new Chemin(
|
|
||||||
"Warp",
|
|
||||||
lieu_preWarp,
|
|
||||||
lieu_postWarp,
|
|
||||||
chemin_ouvert_Warp_1_condition,
|
|
||||||
chemin_visible_Warp_1_condition,
|
|
||||||
chemin_obligatoire_Warp_1_condition,
|
|
||||||
chemin_Warp_1_connaissances,
|
|
||||||
chemin_Warp_1_objets_recus,
|
|
||||||
chemin_Warp_1_objets_conso,
|
|
||||||
chemin_Warp_1_descriptions);
|
|
||||||
|
|
||||||
territoire_chemins.add(chemins_Warp);
|
|
||||||
List<ConditionEt> chemin_ouvert_EndChemin_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_ouvert_EndChemin_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_ouvert_EndChemin_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
chemin_ouvert_EndChemin_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_ouvert_EndChemin_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_ouvert_EndChemin_2_condition = new Condition(chemin_ouvert_EndChemin_2_conditions_ET_list);
|
|
||||||
List<ConditionEt> chemin_visible_EndChemin_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_visible_EndChemin_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_visible_EndChemin_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
chemin_visible_EndChemin_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_visible_EndChemin_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_visible_EndChemin_2_condition = new Condition(chemin_visible_EndChemin_2_conditions_ET_list);
|
|
||||||
List<ConditionEt> chemin_obligatoire_EndChemin_2_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_obligatoire_EndChemin_2_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_obligatoire_EndChemin_2_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(false));
|
|
||||||
chemin_obligatoire_EndChemin_2_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_obligatoire_EndChemin_2_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_obligatoire_EndChemin_2_condition = new Condition(
|
|
||||||
chemin_obligatoire_EndChemin_2_conditions_ET_list);
|
|
||||||
List<Description> chemin_EndChemin_2_descriptions = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionEt> chemin_EndChemin_2_description_1_conditions_ET_list = new ArrayList<>();
|
|
||||||
|
|
||||||
List<ConditionTest> chemin_EndChemin_2_description_1_conditions_TEST_list = new ArrayList<>();
|
|
||||||
|
|
||||||
chemin_EndChemin_2_description_1_conditions_TEST_list.add(
|
|
||||||
new ConditionBoolean(true));
|
|
||||||
chemin_EndChemin_2_description_1_conditions_ET_list.add(
|
|
||||||
new ConditionEt(chemin_EndChemin_2_description_1_conditions_TEST_list));
|
|
||||||
|
|
||||||
Condition chemin_EndChemin_2_description_1_condition = new Condition(
|
|
||||||
chemin_EndChemin_2_description_1_conditions_ET_list);
|
|
||||||
|
|
||||||
chemin_EndChemin_2_descriptions.add(
|
|
||||||
new Description(
|
|
||||||
"END description",
|
|
||||||
chemin_EndChemin_2_description_1_condition));
|
|
||||||
|
|
||||||
List<Connaissance> chemin_EndChemin_2_connaissances = new ArrayList<>();
|
|
||||||
List<Objet> chemin_EndChemin_2_objets_recus = new ArrayList<>();
|
|
||||||
List<Objet> chemin_EndChemin_2_objets_conso = new ArrayList<>();
|
|
||||||
|
|
||||||
Chemin chemins_EndChemin = new Chemin(
|
|
||||||
"EndChemin",
|
|
||||||
lieu_postWarp,
|
|
||||||
lieu_END,
|
|
||||||
chemin_ouvert_EndChemin_2_condition,
|
|
||||||
chemin_visible_EndChemin_2_condition,
|
|
||||||
chemin_obligatoire_EndChemin_2_condition,
|
|
||||||
chemin_EndChemin_2_connaissances,
|
|
||||||
chemin_EndChemin_2_objets_recus,
|
|
||||||
chemin_EndChemin_2_objets_conso,
|
|
||||||
chemin_EndChemin_2_descriptions);
|
|
||||||
|
|
||||||
territoire_chemins.add(chemins_EndChemin);
|
|
||||||
|
|
||||||
Territoire jeu_territoire = new Territoire(territoire_lieux, territoire_chemins);
|
|
||||||
|
|
||||||
Jeu ze_GAME = new Jeu(
|
|
||||||
jeu_territoire,
|
|
||||||
jeu_objets,
|
|
||||||
jeu_connaissances,
|
|
||||||
jeu_personnes,
|
|
||||||
jeu_transformations);
|
|
||||||
|
|
||||||
ze_GAME.jouer();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import static java.util.Map.entry;
|
|
||||||
|
|
||||||
public class Tamerelapute {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
Condition test = new Condition(
|
|
||||||
List.of(
|
|
||||||
List.of(
|
|
||||||
new ConditionBoolean(false),
|
|
||||||
new ConditionBoolean(true)),
|
|
||||||
List.of(
|
|
||||||
new ConditionBoolean(true))));
|
|
||||||
|
|
||||||
System.out.println(test.evaluer());
|
|
||||||
|
|
||||||
Map<String, Objet> test2 = Map.ofEntries(
|
|
||||||
entry(
|
|
||||||
"warpToken",
|
|
||||||
new Objet(
|
|
||||||
"warpToken",
|
|
||||||
1,
|
|
||||||
test,
|
|
||||||
List.of(new Description("test", "prout", test)))),
|
|
||||||
entry(
|
|
||||||
"warpToken2",
|
|
||||||
new Objet(
|
|
||||||
"warpToken2",
|
|
||||||
2,
|
|
||||||
test,
|
|
||||||
List.of(new Description("prout", test)))));
|
|
||||||
|
|
||||||
System.out.println(test2);
|
|
||||||
|
|
||||||
System.out.println(test2.get("warpToken"));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue