From e5255f922e20ca0a1c5903a5441551fb2ea1e870 Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Thu, 9 Dec 2021 18:54:08 +0100 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20du=20progr=C3=A8s=20c=C3=B4t=C3=A9?= =?UTF-8?q?=20mtl=20(=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr.n7.game.examples/src-gen/Action.java | 49 + .../fr.n7.game.examples/src-gen/Chemin.java | 45 + .../src-gen/Condition.java | 21 + .../src-gen/ConditionBoolean.java | 11 + .../src-gen/ConditionConnaissance.java | 21 + .../src-gen/ConditionEt.java | 21 + .../src-gen/ConditionObjet.java | 39 + .../src-gen/ConditionTest.java | 5 + .../src-gen/Connaissance.java | 26 + .../src-gen/Description.java | 16 + .../src-gen/Explorateur.java | 31 + .../src-gen/Interaction.java | 70 + .../fr.n7.game.examples/src-gen/Jeu.java | 120 + .../fr.n7.game.examples/src-gen/Lieu.java | 36 + .../fr.n7.game.examples/src-gen/Objet.java | 29 + .../fr.n7.game.examples/src-gen/Personne.java | 35 + .../src-gen/Prototype.java | 675 -- .../src-gen/Territoire.java | 13 + .../src-gen/Transformation.java | 16 + .../fr.n7.game.toPrototype/bin/.gitignore | 1 - .../n7/game/toPrototype/main/toPrototype.emtl | 8244 +++++++++++++++++ .../n7/game/toPrototype/main/toPrototype.mtl | 25 +- .../n7/game/toPrototype/main/toPrototype.mtl | 25 +- .../xtext/tests/.GameParsingTest.xtendbin | Bin 3389 -> 3389 bytes .../xtext/generator/.GameGenerator.xtendbin | Bin 2284 -> 2284 bytes .../fr.n7.petrinet.toTINA/bin/.gitignore | 1 - .../fr/n7/petrinet/toTINA/main/toTINA.emtl | 1181 +++ 27 files changed, 10057 insertions(+), 699 deletions(-) create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Action.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Condition.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/ConditionBoolean.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/ConditionConnaissance.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/ConditionEt.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/ConditionObjet.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/ConditionTest.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Connaissance.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Description.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Explorateur.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Interaction.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Objet.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Personne.java delete mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Territoire.java create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java delete mode 100644 workspace/fr.n7.game.toPrototype/bin/.gitignore create mode 100644 workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl delete mode 100644 workspace/fr.n7.petrinet.toTINA/bin/.gitignore create mode 100644 workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Action.java b/runtime-workspace/fr.n7.game.examples/src-gen/Action.java new file mode 100644 index 0000000..5665fb1 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Action.java @@ -0,0 +1,49 @@ +import java.util.List; + +public class Action { + Condition visible; + List connaissances; + List objetsRecus; + List objetsConso; + Condition finInterraction; + List descriptions; + + public Action( + Condition visible, + List connaissances, + List objetsRecus, + List objetsConso, + Condition finInterraction, + List descriptions) { + this.visible = visible; + this.connaissances = connaissances; + this.objetsRecus = objetsRecus; + this.objetsConso = objetsConso; + this.finInterraction = finInterraction; + this.descriptions = descriptions; + } + + void actionner() { + for (Connaissance c : this.connaissances) { + if (!Jeu.explorateur.connaissances.contains(c)) { + Jeu.explorateur.connaissances.add(c); + } + } + for (Objet o : this.objetsRecus) { + Jeu.explorateur.objets.add(o); + } + for (Objet o : this.objetsConso) { + Jeu.explorateur.objets.remove(o); + } + } + + @Override + public String toString() { + for (Description d : this.descriptions) { + if (d.condition.evaluer()) { + return d.toString(); + } + } + return "No desc"; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java b/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java new file mode 100644 index 0000000..251c984 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java @@ -0,0 +1,45 @@ +import java.util.List; + +public class Chemin { + Lieu lieuIn; + Lieu lieuOut; + Condition ouvert; + Condition visible; + Condition obligatoire; + List connaissancesRecus; + List objetsRecus; + List objetsConso; + List descriptions; + + public Chemin( + Lieu lieuIn, + Lieu lieuOut, + Condition ouvert, + Condition visible, + Condition obligatoire, + List connaissancesRecus, + List objetsRecus, + List objetsConso, + List descriptions) { + this.lieuIn = lieuIn; + this.lieuOut = lieuOut; + this.ouvert = ouvert; + this.visible = visible; + this.obligatoire = obligatoire; + this.connaissancesRecus = connaissancesRecus; + this.objetsRecus = objetsRecus; + this.objetsConso = objetsConso; + this.descriptions = descriptions; + + } + + @Override + public String toString() { + for (Description d : descriptions) { + if (d.condition.evaluer()) { + return d.toString(); + } + } + return "No desc"; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Condition.java b/runtime-workspace/fr.n7.game.examples/src-gen/Condition.java new file mode 100644 index 0000000..7231129 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Condition.java @@ -0,0 +1,21 @@ +import java.util.List; +import java.util.ArrayList; + +public class Condition { + + List conditionEts; + + public Condition(List conditionEts) { + this.conditionEts = conditionEts; + } + + public Boolean evaluer() { + for (ConditionEt cond : conditionEts) { + if (cond.evaluer()) { + return true; + } + } + return false; + } + +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/ConditionBoolean.java b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionBoolean.java new file mode 100644 index 0000000..383769a --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionBoolean.java @@ -0,0 +1,11 @@ +public class ConditionBoolean implements ConditionTest { + Boolean bool; + + public ConditionBoolean(Boolean bool) { + this.bool = bool; + } + + public Boolean evaluer() { + return this.bool; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/ConditionConnaissance.java b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionConnaissance.java new file mode 100644 index 0000000..beb7a11 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionConnaissance.java @@ -0,0 +1,21 @@ +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; + } + } + +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/ConditionEt.java b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionEt.java new file mode 100644 index 0000000..5458432 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionEt.java @@ -0,0 +1,21 @@ +import java.util.List; +import java.util.ArrayList; + +public class ConditionEt { + + List conditionTests; + + public ConditionEt(List conditionTests) { + this.conditionTests = conditionTests; + } + + public Boolean evaluer() { + for (ConditionTest cond : conditionTests) { + if (!cond.evaluer()) { + return false; + } + } + return true; + } + +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/ConditionObjet.java b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionObjet.java new file mode 100644 index 0000000..5862ecf --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionObjet.java @@ -0,0 +1,39 @@ +public class ConditionObjet implements ConditionTest { + Objet objet; + String operateur; + int nombre; + + public ConditionObjet( + Objet objet, + String operateur, + int nombre) { + this.objet = objet; + this.operateur = operateur; + this.nombre = nombre; + } + + public Boolean evaluer() { + int compteur = 0; + for (Objet obj : Jeu.explorateur.objets) { + if (obj.equals(this.objet)) { + compteur++; + } + } + + if (this.operateur.equals("<")) { + return compteur < nombre; + } else if (this.operateur.equals(">")) { + return compteur > nombre; + } else if (this.operateur.equals("==")) { + return compteur == nombre; + } else if (this.operateur.equals("<=")) { + return compteur <= nombre; + } else if (this.operateur.equals(">=")) { + return compteur >= nombre; + } else if (this.operateur.equals("!=")) { + return compteur != nombre; + } else { + throw new Error("dafuk"); + } + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/ConditionTest.java b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionTest.java new file mode 100644 index 0000000..a886acf --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/ConditionTest.java @@ -0,0 +1,5 @@ +public interface ConditionTest { + + public Boolean evaluer(); + +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Connaissance.java b/runtime-workspace/fr.n7.game.examples/src-gen/Connaissance.java new file mode 100644 index 0000000..044e202 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Connaissance.java @@ -0,0 +1,26 @@ +import java.util.List; + +public class Connaissance { + String nom; + Condition visible; + List descriptions; + + public Connaissance( + String nom, + Condition visible, + List descriptions) { + this.nom = nom; + this.visible = visible; + this.descriptions = descriptions; + } + + @Override + public String toString() { + for (Description d : this.descriptions) { + if (d.condition.evaluer()) { + return "(" + this.nom + " : " + d + ")"; + } + } + return "(" + this.nom + ")"; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Description.java b/runtime-workspace/fr.n7.game.examples/src-gen/Description.java new file mode 100644 index 0000000..adb783b --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Description.java @@ -0,0 +1,16 @@ +public class Description { + String texte; + Condition condition; + + public Description( + String texte, + Condition condition) { + this.texte = texte; + this.condition = condition; + } + + @Override + public String toString() { + return this.texte; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Explorateur.java b/runtime-workspace/fr.n7.game.examples/src-gen/Explorateur.java new file mode 100644 index 0000000..7a58a88 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Explorateur.java @@ -0,0 +1,31 @@ +import java.util.List; + +public class Explorateur { + int taille; + List connaissances; + List objets; + + public Explorateur( + int taille, + List connaissances, + List objets) { + this.taille = taille; + this.connaissances = connaissances; + this.objets = objets; + } + + @Override + public String toString() { + String txt = "Objets :\n"; + for (Objet c : this.objets) { + txt += c + " "; + } + txt += "\n\nConnaissances :\n"; + for (Connaissance c : this.connaissances) { + txt += c + " "; + } + txt += "\n==================================================="; + return txt; + } + +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Interaction.java b/runtime-workspace/fr.n7.game.examples/src-gen/Interaction.java new file mode 100644 index 0000000..4e059f9 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Interaction.java @@ -0,0 +1,70 @@ +import java.util.List; +import java.util.ArrayList; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.IOException; + +public class Interaction { + Condition visible; + List connaissances; + List objetsRecus; + List objetsConso; + List actions; + + public Interaction( + Condition visible, + List connaissances, + List objetsRecus, + List objetsConso, + List actions) { + this.visible = visible; + this.connaissances = connaissances; + this.objetsRecus = objetsRecus; + this.objetsConso = objetsConso; + this.actions = actions; + } + + void interragir(BufferedReader reader, Lieu lieu) { + boolean arreter_interraction = false; + + while (!arreter_interraction) { + System.out.println(this); + System.out.print("\nChoix : "); + + List actions_choix = new ArrayList<>(); + for (Action a : this.actions) { + if (a.visible.evaluer()) { + actions_choix.add(a); + } + } + int choix = 0; + Action a = null; + try { + choix = Integer.parseInt(reader.readLine()); + a = actions_choix.get(choix); + } catch (NumberFormatException e) { + continue; + } catch (IndexOutOfBoundsException e) { + continue; + } catch (IOException e) { + e.printStackTrace(); + } + a.actionner(); + + arreter_interraction = a.finInterraction.evaluer(); + } + } + + @Override + public String toString() { + String res = ""; + int k = 0; + for (Action a : this.actions) { + if (a.visible.evaluer()) { + res += "[" + k + "] " + a + "\n"; + k++; + } + } + return res; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java new file mode 100644 index 0000000..4df2274 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java @@ -0,0 +1,120 @@ +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class Jeu { + public static Explorateur explorateur; + Territoire territoire; + List objets; + List connaissances; + List personnes; + List transformations; + + public Jeu( + Territoire territoire, + List objets, + List connaissances, + List personnes, + List transformations) { + this.territoire = territoire; + this.objets = objets; + this.connaissances = connaissances; + this.personnes = personnes; + this.transformations = transformations; + } + + void jouer() { + BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); + + Lieu lieu = null; + for (Lieu l : territoire.lieux) { + if (l.depart.evaluer()) { + lieu = l; + break; + } + } + + while (!lieu.fin.evaluer()) { + boolean recommencer = false; + + System.out.println("\n\n\n\n\n\n\n\n\n\nLieu : " + lieu + "\n"); + System.out.println(Jeu.explorateur); + + for (Personne p : lieu.personnes) { + if (p.visible.evaluer() && p.obligatoire.evaluer()) { + System.out.println(p + " :"); + + p.interragir(reader, lieu); + recommencer = true; + break; + } + } + if (recommencer) { + continue; + } + + for (Chemin c : territoire.chemins) { + if (c.lieuIn == lieu) { + if (c.visible.evaluer() && c.obligatoire.evaluer() && c.ouvert.evaluer()) { + lieu = c.lieuOut; + recommencer = true; + break; + } + } + } + if (recommencer) { + continue; + } + + int k = 0; + List chemins_choix = new ArrayList<>(); + for (Chemin c : territoire.chemins) { + if (c.lieuIn == lieu) { + if (c.visible.evaluer() && c.ouvert.evaluer()) { + chemins_choix.add(c); + System.out.println("[" + k + "] " + c); + k++; + } + } + } + + List personnes_choix = new ArrayList<>(); + for (Personne p : personnes) { + if (lieu.personnes.contains(p)) { + if (p.visible.evaluer()) { + personnes_choix.add(p); + System.out.println("[" + k + "] " + p); + k++; + } + } + } + + int choix = 0; + try { + System.out.print("\nChoix : "); + choix = Integer.parseInt(reader.readLine()); + if (choix < chemins_choix.size()) { + lieu = chemins_choix.get(choix).lieuOut; + } else { + Personne p = personnes_choix.get(choix - chemins_choix.size()); + + System.out.println("\n\n\n\n\n\n\n\n\n\nLieu : " + lieu + "\n"); + System.out.println(Jeu.explorateur); + System.out.println(p + " :"); + + p.interragir(reader, lieu); + } + } catch (NumberFormatException e) { + continue; + } catch (IndexOutOfBoundsException e) { + continue; + } catch (IOException e) { + e.printStackTrace(); + } + } + + System.out.println("FIN : " + lieu.nom); + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java b/runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java new file mode 100644 index 0000000..4be1123 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java @@ -0,0 +1,36 @@ +import java.util.List; + +public class Lieu { + String nom; + Condition deposable; + Condition depart; + Condition fin; + List personnes; + List descriptions; + List objets; + List connaissances; + + public Lieu( + String nom, + Condition deposable, + Condition depart, + Condition fin, + List personnes, + List descriptions, + List objets, + List connaissances) { + this.nom = nom; + this.deposable = deposable; + this.depart = depart; + this.fin = fin; + this.personnes = personnes; + this.descriptions = descriptions; + this.objets = objets; + this.connaissances = connaissances; + } + + @Override + public String toString() { + return nom; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Objet.java b/runtime-workspace/fr.n7.game.examples/src-gen/Objet.java new file mode 100644 index 0000000..79c35fa --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Objet.java @@ -0,0 +1,29 @@ +import java.util.List; + +public class Objet { + String nom; + int taille; + Condition visible; + List descriptions; + + public Objet( + String nom, + int taille, + Condition visible, + List descriptions) { + this.nom = nom; + this.taille = taille; + this.visible = visible; + this.descriptions = descriptions; + } + + @Override + public String toString() { + for (Description d : this.descriptions) { + if (d.condition.evaluer()) { + return "(" + this.nom + ": " + d + ")"; + } + } + return "(" + this.nom + ")"; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Personne.java b/runtime-workspace/fr.n7.game.examples/src-gen/Personne.java new file mode 100644 index 0000000..3687b6e --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Personne.java @@ -0,0 +1,35 @@ +import java.util.List; +import java.io.InputStreamReader; +import java.io.BufferedReader; + +public class Personne { + String nom; + Condition visible; + Condition obligatoire; + List interactions; + + public Personne( + String nom, + Condition visible, + Condition obligatoire, + List interactions) { + this.nom = nom; + this.visible = visible; + this.obligatoire = obligatoire; + this.interactions = interactions; + } + + void interragir(BufferedReader reader, Lieu lieu) { + for (Interaction i : this.interactions) { + if (i.visible.evaluer()) { + i.interragir(reader, lieu); + } + break; + } + } + + @Override + public String toString() { + return nom; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java b/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java deleted file mode 100644 index c0c097d..0000000 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java +++ /dev/null @@ -1,675 +0,0 @@ -public class Prototype { -public static void main(String[] args) { - -// "Objets" -List jeu_objets = new ArrayList<>(); - - List objet_tentative_descriptions = new ArrayList<>(); - - List objet_tentative_description_1_conditions_ET = new ArrayList<>(); - - List objet_tentative_description_1_conditions_TEST_1 = new ArrayList<>(); - - objet_tentative_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - objet_tentative_description_1_conditions_ET.add(objet_tentative_description_1_conditions_TEST_1) - - - Condition objet_tentative_description_1_condition = new Condition(objet_tentative_description_1_conditions_ET); - - objet_tentative_descriptions.add( - new Description( - "permet repondre une question du sphinx", - objet_tentative_description_1_condition - ) - ); - List objet_visible_tentative_conditions_ET = new ArrayList<>(); - - List objet_visible_tentative_conditions_TEST_1 = new ArrayList<>(); - - objet_visible_tentative_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - objet_visible_tentative_conditions_ET.add(objet_visible_tentative_conditions_TEST_1) - - - Condition objet_visible_tentative_condition = new Condition(objet_visible_tentative_conditions_ET); - Objet objet_tentative = new Objet( - "tentative", - 1, - objet_visible_tentative_condition, - objet_tentative_descriptions - ); - jeu_objets.add(objet_tentative); - -// "Connaissances" -List jeu_connaissances = new ArrayList<>(); - - List connaissance_Reussite_descriptions = new ArrayList<>(); - - List connaissance_Reussite_description_1_conditions_ET = new ArrayList<>(); - - List connaissance_Reussite_description_1_conditions_TEST_1 = new ArrayList<>(); - - connaissance_Reussite_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - connaissance_Reussite_description_1_conditions_ET.add(connaissance_Reussite_description_1_conditions_TEST_1) - - - Condition connaissance_Reussite_description_1_condition = new Condition(connaissance_Reussite_description_1_conditions_ET); - - connaissance_Reussite_descriptions.add( - new Description( - "Permet de se casser de la", - connaissance_Reussite_description_1_condition - ) - ); - List connaissance_visible_Reussite_conditions_ET = new ArrayList<>(); - - List connaissance_visible_Reussite_conditions_TEST_1 = new ArrayList<>(); - - connaissance_visible_Reussite_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - connaissance_visible_Reussite_conditions_ET.add(connaissance_visible_Reussite_conditions_TEST_1) - - - Condition connaissance_visible_Reussite_condition = new Condition(connaissance_visible_Reussite_conditions_ET); - Connaissance connaissance_Reussite = new Connaissance( - "Reussite", - connaissance_visible_Reussite_condition, - connaissance_Reussite_descriptions - ); - jeu_connaissances.add(connaissance_Reussite); - -// "Transformations" -List jeu_transformations = new ArrayList<>(); - - -// "Explorateur" - -List explorateur_inventaire = new ArrayList<>(); - explorateur_inventaire.add(objet_tentative); - explorateur_inventaire.add(objet_tentative); - explorateur_inventaire.add(objet_tentative); - -List explorateur_connaissances = new ArrayList<>(); - -Jeu.explorateur = new Explorateur( - 3, - explorateur_connaissances, - explorateur_inventaire -); - -// "Personnes" - -List jeu_personnes = new ArrayList<>(); - - List personne_visible_Sphinx_1_conditions_ET = new ArrayList<>(); - - List personne_visible_Sphinx_1_conditions_TEST_1 = new ArrayList<>(); - - personne_visible_Sphinx_1_conditions_TEST_1.add( - new ConditionConnaissance( - connaissance_Reussite, - false - ) - ); - personne_visible_Sphinx_1_conditions_ET.add(personne_visible_Sphinx_1_conditions_TEST_1) - - personne_visible_Sphinx_1_conditions_TEST_2.add( - new ConditionObjet( - objet_tentative, - ">", - 0 - ) - ); - personne_visible_Sphinx_1_conditions_ET.add(personne_visible_Sphinx_1_conditions_TEST_2) - - - Condition personne_visible_Sphinx_1_condition = new Condition(personne_visible_Sphinx_1_conditions_ET); - List personne_obligatoire_Sphinx_1_conditions_ET = new ArrayList<>(); - - List personne_obligatoire_Sphinx_1_conditions_TEST_1 = new ArrayList<>(); - - personne_obligatoire_Sphinx_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_obligatoire_Sphinx_1_conditions_ET.add(personne_obligatoire_Sphinx_1_conditions_TEST_1) - - - Condition personne_obligatoire_Sphinx_1_condition = new Condition(personne_obligatoire_Sphinx_1_conditions_ET); - List personne_Sphinx_1_interactions = new ArrayList<>(); - - List personne_Sphinx_1_interaction_visible_1_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_visible_1_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_visible_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_visible_1_conditions_ET.add(personne_Sphinx_1_interaction_visible_1_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_visible_1_condition = new Condition(personne_Sphinx_1_interaction_visible_1_conditions_ET); - List personne_Sphinx_1_interaction_1_actions = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET.add(personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_action_visible_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET); - List personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET.add(personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_action_fin_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET); - List personne_Sphinx_1_interaction_1_descriptions = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_description_1_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_description_1_conditions_ET.add(personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_description_1_conditions_ET); - - personne_Sphinx_1_interaction_1_descriptions.add( - new Description( - "la bonne reponse", - personne_Sphinx_1_interaction_1_description_1_condition - ) - ); - - List personne_Sphinx_1_interaction_1_action_1_connaissances = new ArrayList<>(); - personne_Sphinx_1_interaction_1_action_1_connaissances.add(connaissance_Reussite); - List personne_Sphinx_1_interaction_1_action_1_objets_conso = new ArrayList<>(); - List personne_Sphinx_1_interaction_1_action_1_objets_recus = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_actions.add( - new Action( - personne_Sphinx_1_interaction_1_action_visible_1_condition, - personne_Sphinx_1_interaction_1_action_fin_1_condition, - personne_Sphinx_1_interaction_1_action_1_connaissances, - personne_Sphinx_1_interaction_1_action_1_objets_conso, - personne_Sphinx_1_interaction_1_action_1_objets_recus, - personne_Sphinx_1_interaction_1_action_1_descriptions - ) - ); - List personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET.add(personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_action_visible_2_condition = new Condition(personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET); - List personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET.add(personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_action_fin_2_condition = new Condition(personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET); - List personne_Sphinx_1_interaction_1_descriptions = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_description_1_conditions_ET = new ArrayList<>(); - - List personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - personne_Sphinx_1_interaction_1_description_1_conditions_ET.add(personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1) - - - Condition personne_Sphinx_1_interaction_1_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_description_1_conditions_ET); - - personne_Sphinx_1_interaction_1_descriptions.add( - new Description( - "la mauvaise reponse", - personne_Sphinx_1_interaction_1_description_1_condition - ) - ); - - List personne_Sphinx_1_interaction_1_action_2_connaissances = new ArrayList<>(); - List personne_Sphinx_1_interaction_1_action_2_objets_conso = new ArrayList<>(); - personne_Sphinx_1_interaction_1_action_1_objets_conso.add(objet_tentative); - List personne_Sphinx_1_interaction_1_action_2_objets_recus = new ArrayList<>(); - - personne_Sphinx_1_interaction_1_actions.add( - new Action( - personne_Sphinx_1_interaction_1_action_visible_2_condition, - personne_Sphinx_1_interaction_1_action_fin_2_condition, - personne_Sphinx_1_interaction_1_action_2_connaissances, - personne_Sphinx_1_interaction_1_action_2_objets_conso, - personne_Sphinx_1_interaction_1_action_2_objets_recus, - personne_Sphinx_1_interaction_1_action_2_descriptions - ) - ); - - List personne_Sphinx_1_interaction_1_connaissances = new ArrayList<>(); - List personne_Sphinx_1_interaction_1_objets_conso = new ArrayList<>(); - List personne_Sphinx_1_interaction_1_objets_recus = new ArrayList<>(); - - personne_Sphinx_1_actions.add( - new Action( - personne_Sphinx_1_interaction_visible_1_condition, - personne_Sphinx_1_interaction_1_connaissances, - personne_Sphinx_1_interaction_1_objets_conso, - personne_Sphinx_1_interaction_1_objets_recus, - personne_Sphinx_1_interaction_1_actions - ) - ); - - - Personne personne_Sphinx = new Personne( - "Sphinx", - personne_visible_Sphinx_1_condition, - personne_obligatoire_Sphinx_1_condition, - personne_Sphinx_1_interactions - ); - - jeu_personnes.add(personne_Sphinx); - -// "Lieux" - -List territoire_lieux = new ArrayList<>(); - List lieu_deposable_1_conditions_ET = new ArrayList<>(); - - List lieu_deposable_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_deposable_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_deposable_1_conditions_ET.add(lieu_deposable_1_conditions_TEST_1) - - - Condition lieu_deposable_1_condition = new Condition(lieu_deposable_1_conditions_ET); - List lieu_depart_1_conditions_ET = new ArrayList<>(); - - List lieu_depart_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_depart_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_depart_1_conditions_ET.add(lieu_depart_1_conditions_TEST_1) - - - Condition lieu_depart_1_condition = new Condition(lieu_depart_1_conditions_ET); - List lieu_fin_1_conditions_ET = new ArrayList<>(); - - List lieu_fin_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_fin_1_conditions_TEST_1.add( - new ConditionBoolean(false) - ); - lieu_fin_1_conditions_ET.add(lieu_fin_1_conditions_TEST_1) - - - Condition lieu_fin_1_condition = new Condition(lieu_fin_1_conditions_ET); - List lieu_Enigme_1_descriptions = new ArrayList<>(); - - List lieu_Enigme_1_description_1_conditions_ET = new ArrayList<>(); - - List lieu_Enigme_1_description_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_Enigme_1_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_Enigme_1_description_1_conditions_ET.add(lieu_Enigme_1_description_1_conditions_TEST_1) - - - Condition lieu_Enigme_1_description_1_condition = new Condition(lieu_Enigme_1_description_1_conditions_ET); - - lieu_Enigme_1_descriptions.add( - new Description( - "lieu de depart", - lieu_Enigme_1_description_1_condition - ) - ); - - List lieu_Enigme_1_personnes = new ArrayList<>(); - lieu_Enigme_1_personnes.add(objet_Sphinx); - List lieu_Enigme_1_objets = new ArrayList<>(); - List lieu_Enigme_1_connaissances = new ArrayList<>(); - - // TODO: utiliser un search dans la liste plutot que de déclarer les objets - Lieu lieu_Enigme = new Lieu( - "Enigme", - lieu_deposable_1_condition, - lieu_depart_1_condition, - lieu_fin_1_condition, - lieu_Enigme_1_personnes, - lieu_Enigme_1_descriptions, - lieu_Enigme_1_objets, - lieu_Enigme_1_connaissances - ); - - territoire_lieux.add(lieu_Enigme); - List lieu_deposable_2_conditions_ET = new ArrayList<>(); - - List lieu_deposable_2_conditions_TEST_1 = new ArrayList<>(); - - lieu_deposable_2_conditions_TEST_1.add( - new ConditionBoolean(false) - ); - lieu_deposable_2_conditions_ET.add(lieu_deposable_2_conditions_TEST_1) - - - Condition lieu_deposable_2_condition = new Condition(lieu_deposable_2_conditions_ET); - List lieu_depart_2_conditions_ET = new ArrayList<>(); - - List lieu_depart_2_conditions_TEST_1 = new ArrayList<>(); - - lieu_depart_2_conditions_TEST_1.add( - new ConditionBoolean(false) - ); - lieu_depart_2_conditions_ET.add(lieu_depart_2_conditions_TEST_1) - - - Condition lieu_depart_2_condition = new Condition(lieu_depart_2_conditions_ET); - List lieu_fin_2_conditions_ET = new ArrayList<>(); - - List lieu_fin_2_conditions_TEST_1 = new ArrayList<>(); - - lieu_fin_2_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_fin_2_conditions_ET.add(lieu_fin_2_conditions_TEST_1) - - - Condition lieu_fin_2_condition = new Condition(lieu_fin_2_conditions_ET); - List lieu_Succes_2_descriptions = new ArrayList<>(); - - List lieu_Succes_2_description_1_conditions_ET = new ArrayList<>(); - - List lieu_Succes_2_description_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_Succes_2_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_Succes_2_description_1_conditions_ET.add(lieu_Succes_2_description_1_conditions_TEST_1) - - - Condition lieu_Succes_2_description_1_condition = new Condition(lieu_Succes_2_description_1_conditions_ET); - - lieu_Succes_2_descriptions.add( - new Description( - "lieu succes", - lieu_Succes_2_description_1_condition - ) - ); - - List lieu_Succes_2_personnes = new ArrayList<>(); - List lieu_Succes_2_objets = new ArrayList<>(); - List lieu_Succes_2_connaissances = new ArrayList<>(); - - // TODO: utiliser un search dans la liste plutot que de déclarer les objets - Lieu lieu_Succes = new Lieu( - "Succes", - lieu_deposable_2_condition, - lieu_depart_2_condition, - lieu_fin_2_condition, - lieu_Succes_2_personnes, - lieu_Succes_2_descriptions, - lieu_Succes_2_objets, - lieu_Succes_2_connaissances - ); - - territoire_lieux.add(lieu_Succes); - List lieu_deposable_3_conditions_ET = new ArrayList<>(); - - List lieu_deposable_3_conditions_TEST_1 = new ArrayList<>(); - - lieu_deposable_3_conditions_TEST_1.add( - new ConditionBoolean(false) - ); - lieu_deposable_3_conditions_ET.add(lieu_deposable_3_conditions_TEST_1) - - - Condition lieu_deposable_3_condition = new Condition(lieu_deposable_3_conditions_ET); - List lieu_depart_3_conditions_ET = new ArrayList<>(); - - List lieu_depart_3_conditions_TEST_1 = new ArrayList<>(); - - lieu_depart_3_conditions_TEST_1.add( - new ConditionBoolean(false) - ); - lieu_depart_3_conditions_ET.add(lieu_depart_3_conditions_TEST_1) - - - Condition lieu_depart_3_condition = new Condition(lieu_depart_3_conditions_ET); - List lieu_fin_3_conditions_ET = new ArrayList<>(); - - List lieu_fin_3_conditions_TEST_1 = new ArrayList<>(); - - lieu_fin_3_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_fin_3_conditions_ET.add(lieu_fin_3_conditions_TEST_1) - - - Condition lieu_fin_3_condition = new Condition(lieu_fin_3_conditions_ET); - List lieu_Echec_3_descriptions = new ArrayList<>(); - - List lieu_Echec_3_description_1_conditions_ET = new ArrayList<>(); - - List lieu_Echec_3_description_1_conditions_TEST_1 = new ArrayList<>(); - - lieu_Echec_3_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - lieu_Echec_3_description_1_conditions_ET.add(lieu_Echec_3_description_1_conditions_TEST_1) - - - Condition lieu_Echec_3_description_1_condition = new Condition(lieu_Echec_3_description_1_conditions_ET); - - lieu_Echec_3_descriptions.add( - new Description( - "lieu echec", - lieu_Echec_3_description_1_condition - ) - ); - - List lieu_Echec_3_personnes = new ArrayList<>(); - List lieu_Echec_3_objets = new ArrayList<>(); - List lieu_Echec_3_connaissances = new ArrayList<>(); - - // TODO: utiliser un search dans la liste plutot que de déclarer les objets - Lieu lieu_Echec = new Lieu( - "Echec", - lieu_deposable_3_condition, - lieu_depart_3_condition, - lieu_fin_3_condition, - lieu_Echec_3_personnes, - lieu_Echec_3_descriptions, - lieu_Echec_3_objets, - lieu_Echec_3_connaissances - ); - - territoire_lieux.add(lieu_Echec); - - -// "Chemins" - -List territoire_chemins = new ArrayList<>(); - List chemin_ouvert_win_1_conditions_ET = new ArrayList<>(); - - List chemin_ouvert_win_1_conditions_TEST_1 = new ArrayList<>(); - - chemin_ouvert_win_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_ouvert_win_1_conditions_ET.add(chemin_ouvert_win_1_conditions_TEST_1) - - - Condition chemin_ouvert_win_1_condition = new Condition(chemin_ouvert_win_1_conditions_ET); - List chemin_visible_win_1_conditions_ET = new ArrayList<>(); - - List chemin_visible_win_1_conditions_TEST_1 = new ArrayList<>(); - - chemin_visible_win_1_conditions_TEST_1.add( - new ConditionConnaissance( - connaissance_Reussite, - false - ) - ); - chemin_visible_win_1_conditions_ET.add(chemin_visible_win_1_conditions_TEST_1) - - - Condition chemin_visible_win_1_condition = new Condition(chemin_visible_win_1_conditions_ET); - List chemin_obligatoire_win_1_conditions_ET = new ArrayList<>(); - - List chemin_obligatoire_win_1_conditions_TEST_1 = new ArrayList<>(); - - chemin_obligatoire_win_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_obligatoire_win_1_conditions_ET.add(chemin_obligatoire_win_1_conditions_TEST_1) - - - Condition chemin_obligatoire_win_1_condition = new Condition(chemin_obligatoire_win_1_conditions_ET); - List chemin_win_1_descriptions = new ArrayList<>(); - - List chemin_win_1_description_1_conditions_ET = new ArrayList<>(); - - List chemin_win_1_description_1_conditions_TEST_1 = new ArrayList<>(); - - chemin_win_1_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_win_1_description_1_conditions_ET.add(chemin_win_1_description_1_conditions_TEST_1) - - - Condition chemin_win_1_description_1_condition = new Condition(chemin_win_1_description_1_conditions_ET); - - chemin_win_1_descriptions.add( - new Description( - "Le chemin de la victoire !", - chemin_win_1_description_1_condition - ) - ); - - List chemin_win_1_connaissances = new ArrayList<>(); - List chemin_win_1_objet_recus = new ArrayList<>(); - List chemin_win_1_objet_conso = new ArrayList<>(); - - Chemin chemins_win new Chemin( - "win", - lieu_Enigme, - lieu_Succes, - chemin_ouvert_win_1_condition, - chemin_visible_win_1_condition, - chemin_obligatoire_win_1_condition, - chemin_win_1_connaissances - chemin_win_1_objets_recus, - chemin_win_1_objets_conso, - chemin_win_1_descriptions, - ); - - territoire_chemins.add(chemins_win); - List chemin_ouvert_loose_2_conditions_ET = new ArrayList<>(); - - List chemin_ouvert_loose_2_conditions_TEST_1 = new ArrayList<>(); - - chemin_ouvert_loose_2_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_ouvert_loose_2_conditions_ET.add(chemin_ouvert_loose_2_conditions_TEST_1) - - - Condition chemin_ouvert_loose_2_condition = new Condition(chemin_ouvert_loose_2_conditions_ET); - List chemin_visible_loose_2_conditions_ET = new ArrayList<>(); - - List chemin_visible_loose_2_conditions_TEST_1 = new ArrayList<>(); - - chemin_visible_loose_2_conditions_TEST_1.add( - new ConditionObjet( - objet_tentatives, - "==", - 0 - ) - ); - chemin_visible_loose_2_conditions_ET.add(chemin_visible_loose_2_conditions_TEST_1) - - - Condition chemin_visible_loose_2_condition = new Condition(chemin_visible_loose_2_conditions_ET); - List chemin_obligatoire_loose_2_conditions_ET = new ArrayList<>(); - - List chemin_obligatoire_loose_2_conditions_TEST_1 = new ArrayList<>(); - - chemin_obligatoire_loose_2_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_obligatoire_loose_2_conditions_ET.add(chemin_obligatoire_loose_2_conditions_TEST_1) - - - Condition chemin_obligatoire_loose_2_condition = new Condition(chemin_obligatoire_loose_2_conditions_ET); - List chemin_loose_2_descriptions = new ArrayList<>(); - - List chemin_loose_2_description_1_conditions_ET = new ArrayList<>(); - - List chemin_loose_2_description_1_conditions_TEST_1 = new ArrayList<>(); - - chemin_loose_2_description_1_conditions_TEST_1.add( - new ConditionBoolean(true) - ); - chemin_loose_2_description_1_conditions_ET.add(chemin_loose_2_description_1_conditions_TEST_1) - - - Condition chemin_loose_2_description_1_condition = new Condition(chemin_loose_2_description_1_conditions_ET); - - chemin_loose_2_descriptions.add( - new Description( - "Le chemin de la loose !", - chemin_loose_2_description_1_condition - ) - ); - - List chemin_loose_2_connaissances = new ArrayList<>(); - List chemin_loose_2_objet_recus = new ArrayList<>(); - List chemin_loose_2_objet_conso = new ArrayList<>(); - - Chemin chemins_loose new Chemin( - "loose", - lieu_Enigme, - lieu_Echec, - chemin_ouvert_loose_2_condition, - chemin_visible_loose_2_condition, - chemin_obligatoire_loose_2_condition, - chemin_loose_2_connaissances - chemin_loose_2_objets_recus, - chemin_loose_2_objets_conso, - chemin_loose_2_descriptions, - ); - - territoire_chemins.add(chemins_loose); - -} -} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Territoire.java b/runtime-workspace/fr.n7.game.examples/src-gen/Territoire.java new file mode 100644 index 0000000..9b4b329 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Territoire.java @@ -0,0 +1,13 @@ +import java.util.List; + +public class Territoire { + List lieux; + List chemins; + + public Territoire( + List lieux, + List chemins) { + this.lieux = lieux; + this.chemins = chemins; + } +} diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java b/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java new file mode 100644 index 0000000..e4b2aeb --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java @@ -0,0 +1,16 @@ +import java.util.List; + +public class Transformation { + Condition possible; + List objetsSources; + List objetsResultats; + + public Transformation( + Condition possible, + List objetsSources, + List objetsResultats) { + this.possible = possible; + this.objetsSources = objetsSources; + this.objetsResultats = objetsResultats; + } +} diff --git a/workspace/fr.n7.game.toPrototype/bin/.gitignore b/workspace/fr.n7.game.toPrototype/bin/.gitignore deleted file mode 100644 index 44fde90..0000000 --- a/workspace/fr.n7.game.toPrototype/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/fr/ diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl new file mode 100644 index 0000000..4093a05 --- /dev/null +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl @@ -0,0 +1,8244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + + diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl index f2b2f59..4f735ad 100644 --- a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -1,10 +1,15 @@ [comment encoding = UTF-8 /] [module toPrototype('http://www.n7.fr/game/xtext/Game')] - [template public jeuToPrototype(jeu : Jeu)] [comment @main/] [file ('Prototype.java', false, 'UTF-8')] +import java.util.List; +import java.util.ArrayList; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.IOException; + public class Prototype { public static void main(String['['/][']'/] args) { @@ -156,26 +161,26 @@ List territoire_chemins = new ArrayList<>(); [for (c : Nom | ch.connaissances)] chemin_[ch.nom.nom/]_[i/]_connaissances.add(connaissance_[c.nom/]); [/for] - List chemin_[ch.nom.nom/]_[i/]_objet_recus = new ArrayList<>(); + List chemin_[ch.nom.nom/]_[i/]_objets_recus = new ArrayList<>(); [for (o : Nom | ch.objetsRecus)] chemin_[ch.nom.nom/]_[i/]_objets_recus.add(objet_[o.nom/]); [/for] - List chemin_[ch.nom.nom/]_[i/]_objet_conso = new ArrayList<>(); + List chemin_[ch.nom.nom/]_[i/]_objets_conso = new ArrayList<>(); [for (o : Nom | ch.objetsConso)] chemin_[ch.nom.nom/]_[i/]_objets_conso.add(objet_[o.nom/]); [/for] - Chemin chemins_[ch.nom.nom/] new Chemin( + Chemin chemins_[ch.nom.nom/] = new Chemin( "[ch.nom.nom/]", lieu_[ch.lieuIn.nom/], lieu_[ch.lieuOut.nom/], chemin_ouvert_[ch.nom.nom/]_[i/]_condition, chemin_visible_[ch.nom.nom/]_[i/]_condition, chemin_obligatoire_[ch.nom.nom/]_[i/]_condition, - chemin_[ch.nom.nom/]_[i/]_connaissances + chemin_[ch.nom.nom/]_[i/]_connaissances, chemin_[ch.nom.nom/]_[i/]_objets_recus, chemin_[ch.nom.nom/]_[i/]_objets_conso, - chemin_[ch.nom.nom/]_[i/]_descriptions, + chemin_[ch.nom.nom/]_[i/]_descriptions ); territoire_chemins.add(chemins_[ch.nom.nom/]); @@ -190,10 +195,8 @@ List territoire_chemins = new ArrayList<>(); List [name/]_conditions_ET = new ArrayList<>(); [for (cET : ConditionEt | c.condition)] - List [name/]_conditions_TEST_[i/] = new ArrayList<>(); - [for (cTEST : ConditionTest | cET.conditionTest)] - [name/]_conditions_TEST_[i/].add( + [name/]_conditions_ET_[i/].add( [if (cTEST.oclIsKindOf(ConditionBoolean))] [let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)] new ConditionBoolean([cBOOL.valeur/]) @@ -215,7 +218,7 @@ List [name/]_conditions_ET = new ArrayList<>(); [/let] [/if] ); - [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]) + [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]); [/for] [/for] @@ -244,7 +247,7 @@ List [name/]_actions = new ArrayList<>(); [for (a : Action | as)] [print_condition(a.visible, name + '_action_visible_' + i.toString())/] [print_condition(a.finInteraction, name + '_action_fin_' + i.toString())/] - [print_descriptions(a.descriptions, name)/] + [print_descriptions(a.descriptions, name + '_' + i.toString())/] List [name/]_action_[i/]_connaissances = new ArrayList<>(); [for (c : Nom | a.connaissances)] diff --git a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl index f2b2f59..4f735ad 100644 --- a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -1,10 +1,15 @@ [comment encoding = UTF-8 /] [module toPrototype('http://www.n7.fr/game/xtext/Game')] - [template public jeuToPrototype(jeu : Jeu)] [comment @main/] [file ('Prototype.java', false, 'UTF-8')] +import java.util.List; +import java.util.ArrayList; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.IOException; + public class Prototype { public static void main(String['['/][']'/] args) { @@ -156,26 +161,26 @@ List territoire_chemins = new ArrayList<>(); [for (c : Nom | ch.connaissances)] chemin_[ch.nom.nom/]_[i/]_connaissances.add(connaissance_[c.nom/]); [/for] - List chemin_[ch.nom.nom/]_[i/]_objet_recus = new ArrayList<>(); + List chemin_[ch.nom.nom/]_[i/]_objets_recus = new ArrayList<>(); [for (o : Nom | ch.objetsRecus)] chemin_[ch.nom.nom/]_[i/]_objets_recus.add(objet_[o.nom/]); [/for] - List chemin_[ch.nom.nom/]_[i/]_objet_conso = new ArrayList<>(); + List chemin_[ch.nom.nom/]_[i/]_objets_conso = new ArrayList<>(); [for (o : Nom | ch.objetsConso)] chemin_[ch.nom.nom/]_[i/]_objets_conso.add(objet_[o.nom/]); [/for] - Chemin chemins_[ch.nom.nom/] new Chemin( + Chemin chemins_[ch.nom.nom/] = new Chemin( "[ch.nom.nom/]", lieu_[ch.lieuIn.nom/], lieu_[ch.lieuOut.nom/], chemin_ouvert_[ch.nom.nom/]_[i/]_condition, chemin_visible_[ch.nom.nom/]_[i/]_condition, chemin_obligatoire_[ch.nom.nom/]_[i/]_condition, - chemin_[ch.nom.nom/]_[i/]_connaissances + chemin_[ch.nom.nom/]_[i/]_connaissances, chemin_[ch.nom.nom/]_[i/]_objets_recus, chemin_[ch.nom.nom/]_[i/]_objets_conso, - chemin_[ch.nom.nom/]_[i/]_descriptions, + chemin_[ch.nom.nom/]_[i/]_descriptions ); territoire_chemins.add(chemins_[ch.nom.nom/]); @@ -190,10 +195,8 @@ List territoire_chemins = new ArrayList<>(); List [name/]_conditions_ET = new ArrayList<>(); [for (cET : ConditionEt | c.condition)] - List [name/]_conditions_TEST_[i/] = new ArrayList<>(); - [for (cTEST : ConditionTest | cET.conditionTest)] - [name/]_conditions_TEST_[i/].add( + [name/]_conditions_ET_[i/].add( [if (cTEST.oclIsKindOf(ConditionBoolean))] [let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)] new ConditionBoolean([cBOOL.valeur/]) @@ -215,7 +218,7 @@ List [name/]_conditions_ET = new ArrayList<>(); [/let] [/if] ); - [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]) + [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]); [/for] [/for] @@ -244,7 +247,7 @@ List [name/]_actions = new ArrayList<>(); [for (a : Action | as)] [print_condition(a.visible, name + '_action_visible_' + i.toString())/] [print_condition(a.finInteraction, name + '_action_fin_' + i.toString())/] - [print_descriptions(a.descriptions, name)/] + [print_descriptions(a.descriptions, name + '_' + i.toString())/] List [name/]_action_[i/]_connaissances = new ArrayList<>(); [for (c : Nom | a.connaissances)] diff --git a/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin b/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin index 93324e663deb3595718243f746b199ffa16563c3..047e7921261195f195cccce28d3a8c129b867181 100644 GIT binary patch delta 58 zcmdlhwO5KKz?+#xgn@&DgTZ&&MxGC>Ouo}L|6}!M0nz?kdQ3oiay^d)h}y~H0HS{L GH~|3Ms1c?B delta 58 zcmdlhwO5KKz?+#xgn@&DgMqDWBhLp`CbqWC|5*K5K(s%X9uttBT+d?xqIU8)fT-U* FP5`TF51ar1 diff --git a/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin b/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin index b6ef35ac32d96253dc52c86134154c5f71a1f08b..e63c5c0393abefc69c339ed0810f733fe09598a3 100644 GIT binary patch delta 58 zcmaDO_(qT?z?+#xgn@&DgTZ&&MxH&)Ouo}LpJHxc0?|Hf4;X>;WIYZG5S78<0HRiL GH~|3ZfDvE- delta 58 zcmaDO_(qT?z?+#xgn@&DgW-4UMxH&)Out(;WIYZG5S78<0HRiL GH~|1de-#b@ diff --git a/workspace/fr.n7.petrinet.toTINA/bin/.gitignore b/workspace/fr.n7.petrinet.toTINA/bin/.gitignore deleted file mode 100644 index 44fde90..0000000 --- a/workspace/fr.n7.petrinet.toTINA/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/fr/ diff --git a/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl new file mode 100644 index 0000000..5050566 --- /dev/null +++ b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl @@ -0,0 +1,1181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + + From 36d55796741a7bdc330e2baac847aabf5fbd466f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20N=C3=A9grel-Jerzy?= Date: Fri, 10 Dec 2021 15:13:39 +0100 Subject: [PATCH 2/3] feat: setup Sirius project no assets defined yet --- workspace/fr.n7.game.design/.classpath | 7 + workspace/fr.n7.game.design/.project | 24 +++ .../fr.n7.game.design/META-INF/MANIFEST.MF | 16 ++ workspace/fr.n7.game.design/build.properties | 7 + .../description/game.odesign | 10 + workspace/fr.n7.game.design/enigme.game | 174 ++++++++++++++++++ workspace/fr.n7.game.design/plugin.properties | 3 + workspace/fr.n7.game.design/plugin.xml | 10 + .../src/fr/n7/game/design/Activator.java | 66 +++++++ .../src/fr/n7/game/design/Services.java | 17 ++ workspace/fr.n7.game.samples/.project | 18 ++ workspace/fr.n7.game.samples/enigme.game | 174 ++++++++++++++++++ .../fr.n7.game.samples/representations.aird | 7 + 13 files changed, 533 insertions(+) create mode 100644 workspace/fr.n7.game.design/.classpath create mode 100644 workspace/fr.n7.game.design/.project create mode 100644 workspace/fr.n7.game.design/META-INF/MANIFEST.MF create mode 100644 workspace/fr.n7.game.design/build.properties create mode 100644 workspace/fr.n7.game.design/description/game.odesign create mode 100644 workspace/fr.n7.game.design/enigme.game create mode 100644 workspace/fr.n7.game.design/plugin.properties create mode 100644 workspace/fr.n7.game.design/plugin.xml create mode 100644 workspace/fr.n7.game.design/src/fr/n7/game/design/Activator.java create mode 100644 workspace/fr.n7.game.design/src/fr/n7/game/design/Services.java create mode 100644 workspace/fr.n7.game.samples/.project create mode 100644 workspace/fr.n7.game.samples/enigme.game create mode 100644 workspace/fr.n7.game.samples/representations.aird diff --git a/workspace/fr.n7.game.design/.classpath b/workspace/fr.n7.game.design/.classpath new file mode 100644 index 0000000..39810b7 --- /dev/null +++ b/workspace/fr.n7.game.design/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/workspace/fr.n7.game.design/.project b/workspace/fr.n7.game.design/.project new file mode 100644 index 0000000..3257a6d --- /dev/null +++ b/workspace/fr.n7.game.design/.project @@ -0,0 +1,24 @@ + + + fr.n7.game.design + + + + + org.eclipse.jdt.core.javabuilder + + + + org.eclipse.pde.ManifestBuilder + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/workspace/fr.n7.game.design/META-INF/MANIFEST.MF b/workspace/fr.n7.game.design/META-INF/MANIFEST.MF new file mode 100644 index 0000000..693feaa --- /dev/null +++ b/workspace/fr.n7.game.design/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.n7.game.design;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.n7.game.design.Activator +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Vendor: %providerName +Automatic-Module-Name: fr.n7.game.design diff --git a/workspace/fr.n7.game.design/build.properties b/workspace/fr.n7.game.design/build.properties new file mode 100644 index 0000000..1ab7df2 --- /dev/null +++ b/workspace/fr.n7.game.design/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.properties,\ + plugin.xml diff --git a/workspace/fr.n7.game.design/description/game.odesign b/workspace/fr.n7.game.design/description/game.odesign new file mode 100644 index 0000000..1e1f8ed --- /dev/null +++ b/workspace/fr.n7.game.design/description/game.odesign @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/workspace/fr.n7.game.design/enigme.game b/workspace/fr.n7.game.design/enigme.game new file mode 100644 index 0000000..8880ec9 --- /dev/null +++ b/workspace/fr.n7.game.design/enigme.game @@ -0,0 +1,174 @@ +{ + "Explorateur": { + "taille": 3, + "connaissances": [], + "objets": [ + "tentative", + "tentative", + "tentative" + ] + }, + "Territoire": { + "Lieux": [ + { + "nom": "Enigme", + "deposable": true, + "depart": true, + "fin": false, + "personnes": [ + "Sphinx" + ], + "descriptions": [ + { + "texte": "lieu de depart", + "condition": true + } + ], + "objets": [], + "connaissances": [] + }, + { + "nom": "Succes", + "deposable": false, + "depart": false, + "fin": true, + "personnes": [], + "descriptions": [ + { + "texte": "lieu succes", + "condition": true + } + ], + "objets": [], + "connaissances": [] + }, + { + "nom": "Echec", + "deposable": false, + "depart": false, + "fin": true, + "personnes": [], + "descriptions": [ + { + "texte": "lieu echec", + "condition": true + } + ], + "objets": [], + "connaissances": [] + } + ], + "Chemins": [ + { + "nom": "win", + "lieu_in": "Enigme", + "lieu_out": "Succes", + "ouvert": true, + "visible": Reussite, + "obligatoire": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "descriptions": [ + { + "texte": "Le chemin de la victoire !", + "condition": true + } + ] + }, + { + "nom": "loose", + "lieu_in": "Enigme", + "lieu_out": "Echec", + "ouvert": true, + "visible": tentatives == 0, + "obligatoire": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "descriptions": [ + { + "texte": "Le chemin de la loose !", + "condition": true + } + ] + } + ] + }, + "Objets": [ + { + "nom": "tentative", + "taille": 1, + "visible": true, + "descriptions": [ + { + "texte": "permet repondre une question du sphinx", + "condition": true + } + ] + } + ], + "Connaissances": [ + { + "nom": "Reussite", + "visible": true, + "descriptions": [ + { + "texte": "Permet de se casser de la", + "condition": true + } + ] + } + ], + "Personnes": [ + { + "nom": "Sphinx", + "visible": ! Reussite && tentative > 0, + "obligatoire": true, + "interactions": [ + { + "nom": "Parler", + "visible": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "actions": [ + { + "nom": "Reponse_1", + "visible": true, + "fin_interaction": true, + "connaissances": [ + "Reussite" + ], + "objets_recus": [], + "objets_conso": [], + "descriptions" : [ + { + "texte": "la bonne reponse", + "condition": true + } + ] + }, + { + "nom": "Reponse_2", + "visible": true, + "fin_interaction": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [ + "tentative" + ], + "descriptions" : [ + { + "texte": "la mauvaise reponse", + "condition": true + } + ] + } + ] + } + ] + } + ], + "Transformations": [] +} \ No newline at end of file diff --git a/workspace/fr.n7.game.design/plugin.properties b/workspace/fr.n7.game.design/plugin.properties new file mode 100644 index 0000000..fef353f --- /dev/null +++ b/workspace/fr.n7.game.design/plugin.properties @@ -0,0 +1,3 @@ +pluginName = fr.n7.game.design +providerName = Eclipse Modeling Project +viewpointName = MyViewpoint diff --git a/workspace/fr.n7.game.design/plugin.xml b/workspace/fr.n7.game.design/plugin.xml new file mode 100644 index 0000000..86965a0 --- /dev/null +++ b/workspace/fr.n7.game.design/plugin.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/workspace/fr.n7.game.design/src/fr/n7/game/design/Activator.java b/workspace/fr.n7.game.design/src/fr/n7/game/design/Activator.java new file mode 100644 index 0000000..dcf6fcd --- /dev/null +++ b/workspace/fr.n7.game.design/src/fr/n7/game/design/Activator.java @@ -0,0 +1,66 @@ +package fr.n7.game.design; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "fr.n7.game.design"; + + // The shared instance + private static Activator plugin; + + private static Set viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/game.odesign")); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint: viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/workspace/fr.n7.game.design/src/fr/n7/game/design/Services.java b/workspace/fr.n7.game.design/src/fr/n7/game/design/Services.java new file mode 100644 index 0000000..c953c30 --- /dev/null +++ b/workspace/fr.n7.game.design/src/fr/n7/game/design/Services.java @@ -0,0 +1,17 @@ +package fr.n7.game.design; + +import org.eclipse.emf.ecore.EObject; + +/** + * The services class used by VSM. + */ +public class Services { + + /** + * See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods. + */ + public EObject myService(EObject self, String arg) { + // TODO Auto-generated code + return self; + } +} diff --git a/workspace/fr.n7.game.samples/.project b/workspace/fr.n7.game.samples/.project new file mode 100644 index 0000000..4983b22 --- /dev/null +++ b/workspace/fr.n7.game.samples/.project @@ -0,0 +1,18 @@ + + + fr.n7.game.samples + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.sirius.nature.modelingproject + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/workspace/fr.n7.game.samples/enigme.game b/workspace/fr.n7.game.samples/enigme.game new file mode 100644 index 0000000..8880ec9 --- /dev/null +++ b/workspace/fr.n7.game.samples/enigme.game @@ -0,0 +1,174 @@ +{ + "Explorateur": { + "taille": 3, + "connaissances": [], + "objets": [ + "tentative", + "tentative", + "tentative" + ] + }, + "Territoire": { + "Lieux": [ + { + "nom": "Enigme", + "deposable": true, + "depart": true, + "fin": false, + "personnes": [ + "Sphinx" + ], + "descriptions": [ + { + "texte": "lieu de depart", + "condition": true + } + ], + "objets": [], + "connaissances": [] + }, + { + "nom": "Succes", + "deposable": false, + "depart": false, + "fin": true, + "personnes": [], + "descriptions": [ + { + "texte": "lieu succes", + "condition": true + } + ], + "objets": [], + "connaissances": [] + }, + { + "nom": "Echec", + "deposable": false, + "depart": false, + "fin": true, + "personnes": [], + "descriptions": [ + { + "texte": "lieu echec", + "condition": true + } + ], + "objets": [], + "connaissances": [] + } + ], + "Chemins": [ + { + "nom": "win", + "lieu_in": "Enigme", + "lieu_out": "Succes", + "ouvert": true, + "visible": Reussite, + "obligatoire": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "descriptions": [ + { + "texte": "Le chemin de la victoire !", + "condition": true + } + ] + }, + { + "nom": "loose", + "lieu_in": "Enigme", + "lieu_out": "Echec", + "ouvert": true, + "visible": tentatives == 0, + "obligatoire": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "descriptions": [ + { + "texte": "Le chemin de la loose !", + "condition": true + } + ] + } + ] + }, + "Objets": [ + { + "nom": "tentative", + "taille": 1, + "visible": true, + "descriptions": [ + { + "texte": "permet repondre une question du sphinx", + "condition": true + } + ] + } + ], + "Connaissances": [ + { + "nom": "Reussite", + "visible": true, + "descriptions": [ + { + "texte": "Permet de se casser de la", + "condition": true + } + ] + } + ], + "Personnes": [ + { + "nom": "Sphinx", + "visible": ! Reussite && tentative > 0, + "obligatoire": true, + "interactions": [ + { + "nom": "Parler", + "visible": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [], + "actions": [ + { + "nom": "Reponse_1", + "visible": true, + "fin_interaction": true, + "connaissances": [ + "Reussite" + ], + "objets_recus": [], + "objets_conso": [], + "descriptions" : [ + { + "texte": "la bonne reponse", + "condition": true + } + ] + }, + { + "nom": "Reponse_2", + "visible": true, + "fin_interaction": true, + "connaissances": [], + "objets_recus": [], + "objets_conso": [ + "tentative" + ], + "descriptions" : [ + { + "texte": "la mauvaise reponse", + "condition": true + } + ] + } + ] + } + ] + } + ], + "Transformations": [] +} \ No newline at end of file diff --git a/workspace/fr.n7.game.samples/representations.aird b/workspace/fr.n7.game.samples/representations.aird new file mode 100644 index 0000000..fbd418f --- /dev/null +++ b/workspace/fr.n7.game.samples/representations.aird @@ -0,0 +1,7 @@ + + + enigme.game + + + + From 298be2b9efa0aebce3606680bbaf8dc601e3bb0c Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Fri, 10 Dec 2021 15:19:47 +0100 Subject: [PATCH 3/3] feat: omg le prototype fonctionne, un peu broken mais tkt --- .../fr.n7.game.examples/enigme.game | 2 +- .../fr.n7.game.examples/src-gen/Action.java | 2 +- .../fr.n7.game.examples/src-gen/Chemin.java | 3 + .../fr.n7.game.examples/src-gen/Jeu.java | 11 +- .../src-gen/Prototype.java | 724 +++ .../n7/game/toPrototype/main/toPrototype.emtl | 5214 +++++++++-------- .../n7/game/toPrototype/main/toPrototype.mtl | 51 +- .../n7/game/toPrototype/main/toPrototype.mtl | 51 +- .../xtext/tests/.GameParsingTest.xtendbin | Bin 3389 -> 3389 bytes .../xtext/generator/.GameGenerator.xtendbin | Bin 2284 -> 2284 bytes 10 files changed, 3439 insertions(+), 2619 deletions(-) create mode 100644 runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java diff --git a/runtime-workspace/fr.n7.game.examples/enigme.game b/runtime-workspace/fr.n7.game.examples/enigme.game index 8880ec9..b06455f 100644 --- a/runtime-workspace/fr.n7.game.examples/enigme.game +++ b/runtime-workspace/fr.n7.game.examples/enigme.game @@ -81,7 +81,7 @@ "lieu_in": "Enigme", "lieu_out": "Echec", "ouvert": true, - "visible": tentatives == 0, + "visible": tentative == 0, "obligatoire": true, "connaissances": [], "objets_recus": [], diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Action.java b/runtime-workspace/fr.n7.game.examples/src-gen/Action.java index 5665fb1..f456faf 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Action.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Action.java @@ -10,10 +10,10 @@ public class Action { public Action( Condition visible, + Condition finInterraction, List connaissances, List objetsRecus, List objetsConso, - Condition finInterraction, List descriptions) { this.visible = visible; this.connaissances = connaissances; diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java b/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java index 251c984..9702699 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java @@ -1,6 +1,7 @@ import java.util.List; public class Chemin { + String nom; Lieu lieuIn; Lieu lieuOut; Condition ouvert; @@ -12,6 +13,7 @@ public class Chemin { List descriptions; public Chemin( + String nom, Lieu lieuIn, Lieu lieuOut, Condition ouvert, @@ -21,6 +23,7 @@ public class Chemin { List objetsRecus, List objetsConso, List descriptions) { + this.nom = nom; this.lieuIn = lieuIn; this.lieuOut = lieuOut; this.ouvert = ouvert; diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java index 4df2274..c2a5fe3 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java @@ -25,6 +25,11 @@ public class Jeu { this.transformations = transformations; } + public static void clearScreen() { + System.out.print("\033[H\033[2J"); + System.out.flush(); + } + void jouer() { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); @@ -39,7 +44,8 @@ public class Jeu { while (!lieu.fin.evaluer()) { boolean recommencer = false; - System.out.println("\n\n\n\n\n\n\n\n\n\nLieu : " + lieu + "\n"); + clearScreen(); + System.out.println("Lieu : " + lieu + "\n"); System.out.println(Jeu.explorateur); for (Personne p : lieu.personnes) { @@ -100,7 +106,8 @@ public class Jeu { } else { Personne p = personnes_choix.get(choix - chemins_choix.size()); - System.out.println("\n\n\n\n\n\n\n\n\n\nLieu : " + lieu + "\n"); + clearScreen(); + System.out.println("Lieu : " + lieu + "\n"); System.out.println(Jeu.explorateur); System.out.println(p + " :"); diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java b/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java new file mode 100644 index 0000000..d494697 --- /dev/null +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java @@ -0,0 +1,724 @@ +import java.util.List; +import java.util.ArrayList; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.IOException; + +public class Prototype { +public static void main(String[] args) { + +// "Objets" +List jeu_objets = new ArrayList<>(); + + List objet_tentative_descriptions = new ArrayList<>(); + + List objet_tentative_description_1_conditions_ET_list = new ArrayList<>(); + + List objet_tentative_description_1_conditions_TEST_list = new ArrayList<>(); + + objet_tentative_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + objet_tentative_description_1_conditions_ET_list.add( + new ConditionEt(objet_tentative_description_1_conditions_TEST_list) + ); + + Condition objet_tentative_description_1_condition = new Condition(objet_tentative_description_1_conditions_ET_list); + + objet_tentative_descriptions.add( + new Description( + "permet repondre une question du sphinx", + objet_tentative_description_1_condition + ) + ); + List objet_visible_tentative_conditions_ET_list = new ArrayList<>(); + + List objet_visible_tentative_conditions_TEST_list = new ArrayList<>(); + + objet_visible_tentative_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + objet_visible_tentative_conditions_ET_list.add( + new ConditionEt(objet_visible_tentative_conditions_TEST_list) + ); + + Condition objet_visible_tentative_condition = new Condition(objet_visible_tentative_conditions_ET_list); + Objet objet_tentative = new Objet( + "tentative", + 1, + objet_visible_tentative_condition, + objet_tentative_descriptions + ); + jeu_objets.add(objet_tentative); + +// "Connaissances" +List jeu_connaissances = new ArrayList<>(); + + List connaissance_Reussite_descriptions = new ArrayList<>(); + + List connaissance_Reussite_description_1_conditions_ET_list = new ArrayList<>(); + + List connaissance_Reussite_description_1_conditions_TEST_list = new ArrayList<>(); + + connaissance_Reussite_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + connaissance_Reussite_description_1_conditions_ET_list.add( + new ConditionEt(connaissance_Reussite_description_1_conditions_TEST_list) + ); + + Condition connaissance_Reussite_description_1_condition = new Condition(connaissance_Reussite_description_1_conditions_ET_list); + + connaissance_Reussite_descriptions.add( + new Description( + "Permet de se casser de la", + connaissance_Reussite_description_1_condition + ) + ); + List connaissance_visible_Reussite_conditions_ET_list = new ArrayList<>(); + + List connaissance_visible_Reussite_conditions_TEST_list = new ArrayList<>(); + + connaissance_visible_Reussite_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + connaissance_visible_Reussite_conditions_ET_list.add( + new ConditionEt(connaissance_visible_Reussite_conditions_TEST_list) + ); + + Condition connaissance_visible_Reussite_condition = new Condition(connaissance_visible_Reussite_conditions_ET_list); + Connaissance connaissance_Reussite = new Connaissance( + "Reussite", + connaissance_visible_Reussite_condition, + connaissance_Reussite_descriptions + ); + jeu_connaissances.add(connaissance_Reussite); + +// "Transformations" +List jeu_transformations = new ArrayList<>(); + + +// "Explorateur" + +List explorateur_inventaire = new ArrayList<>(); + explorateur_inventaire.add(objet_tentative); + explorateur_inventaire.add(objet_tentative); + explorateur_inventaire.add(objet_tentative); + +List explorateur_connaissances = new ArrayList<>(); + +Jeu.explorateur = new Explorateur( + 3, + explorateur_connaissances, + explorateur_inventaire +); + +// "Personnes" + +List jeu_personnes = new ArrayList<>(); + + List personne_visible_Sphinx_1_conditions_ET_list = new ArrayList<>(); + + List personne_visible_Sphinx_1_conditions_TEST_list = new ArrayList<>(); + + personne_visible_Sphinx_1_conditions_TEST_list.add( + new ConditionConnaissance( + connaissance_Reussite, + true + ) + ); + personne_visible_Sphinx_1_conditions_TEST_list.add( + new ConditionObjet( + objet_tentative, + ">", + 0 + ) + ); + personne_visible_Sphinx_1_conditions_ET_list.add( + new ConditionEt(personne_visible_Sphinx_1_conditions_TEST_list) + ); + + Condition personne_visible_Sphinx_1_condition = new Condition(personne_visible_Sphinx_1_conditions_ET_list); + List personne_obligatoire_Sphinx_1_conditions_ET_list = new ArrayList<>(); + + List personne_obligatoire_Sphinx_1_conditions_TEST_list = new ArrayList<>(); + + personne_obligatoire_Sphinx_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_obligatoire_Sphinx_1_conditions_ET_list.add( + new ConditionEt(personne_obligatoire_Sphinx_1_conditions_TEST_list) + ); + + Condition personne_obligatoire_Sphinx_1_condition = new Condition(personne_obligatoire_Sphinx_1_conditions_ET_list); + List personne_Sphinx_1_interactions = new ArrayList<>(); + + List personne_Sphinx_1_interaction_visible_1_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_visible_1_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_visible_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_visible_1_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_visible_1_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_visible_1_condition = new Condition(personne_Sphinx_1_interaction_visible_1_conditions_ET_list); + List personne_Sphinx_1_interaction_1_actions = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_visible_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET_list); + List personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_fin_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET_list); + List personne_Sphinx_1_interaction_1_action_1_descriptions = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_1_description_1_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_1_description_1_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_1_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_1_description_1_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_1_description_1_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_1_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_1_description_1_conditions_ET_list); + + personne_Sphinx_1_interaction_1_action_1_descriptions.add( + new Description( + "la bonne reponse", + personne_Sphinx_1_interaction_1_action_1_description_1_condition + ) + ); + + List personne_Sphinx_1_interaction_1_action_1_connaissances = new ArrayList<>(); + personne_Sphinx_1_interaction_1_action_1_connaissances.add(connaissance_Reussite); + List personne_Sphinx_1_interaction_1_action_1_objets_conso = new ArrayList<>(); + List personne_Sphinx_1_interaction_1_action_1_objets_recus = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_actions.add( + new Action( + personne_Sphinx_1_interaction_1_action_visible_1_condition, + personne_Sphinx_1_interaction_1_action_fin_1_condition, + personne_Sphinx_1_interaction_1_action_1_connaissances, + personne_Sphinx_1_interaction_1_action_1_objets_conso, + personne_Sphinx_1_interaction_1_action_1_objets_recus, + personne_Sphinx_1_interaction_1_action_1_descriptions + ) + ); + List personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_visible_2_condition = new Condition(personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET_list); + List personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_fin_2_condition = new Condition(personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET_list); + List personne_Sphinx_1_interaction_1_action_2_descriptions = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_2_description_1_conditions_ET_list = new ArrayList<>(); + + List personne_Sphinx_1_interaction_1_action_2_description_1_conditions_TEST_list = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_action_2_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + personne_Sphinx_1_interaction_1_action_2_description_1_conditions_ET_list.add( + new ConditionEt(personne_Sphinx_1_interaction_1_action_2_description_1_conditions_TEST_list) + ); + + Condition personne_Sphinx_1_interaction_1_action_2_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_action_2_description_1_conditions_ET_list); + + personne_Sphinx_1_interaction_1_action_2_descriptions.add( + new Description( + "la mauvaise reponse", + personne_Sphinx_1_interaction_1_action_2_description_1_condition + ) + ); + + List personne_Sphinx_1_interaction_1_action_2_connaissances = new ArrayList<>(); + List personne_Sphinx_1_interaction_1_action_2_objets_conso = new ArrayList<>(); + personne_Sphinx_1_interaction_1_action_2_objets_conso.add(objet_tentative); + List personne_Sphinx_1_interaction_1_action_2_objets_recus = new ArrayList<>(); + + personne_Sphinx_1_interaction_1_actions.add( + new Action( + personne_Sphinx_1_interaction_1_action_visible_2_condition, + personne_Sphinx_1_interaction_1_action_fin_2_condition, + personne_Sphinx_1_interaction_1_action_2_connaissances, + personne_Sphinx_1_interaction_1_action_2_objets_recus, + personne_Sphinx_1_interaction_1_action_2_objets_conso, + personne_Sphinx_1_interaction_1_action_2_descriptions + ) + ); + + List personne_Sphinx_1_interaction_1_connaissances = new ArrayList<>(); + List personne_Sphinx_1_interaction_1_objets_conso = new ArrayList<>(); + List personne_Sphinx_1_interaction_1_objets_recus = new ArrayList<>(); + + personne_Sphinx_1_interactions.add( + new Interaction( + personne_Sphinx_1_interaction_visible_1_condition, + personne_Sphinx_1_interaction_1_connaissances, + personne_Sphinx_1_interaction_1_objets_conso, + personne_Sphinx_1_interaction_1_objets_recus, + personne_Sphinx_1_interaction_1_actions + ) + ); + + + Personne personne_Sphinx = new Personne( + "Sphinx", + personne_visible_Sphinx_1_condition, + personne_obligatoire_Sphinx_1_condition, + personne_Sphinx_1_interactions + ); + + jeu_personnes.add(personne_Sphinx); + +// "Lieux" + +List territoire_lieux = new ArrayList<>(); + List lieu_deposable_1_conditions_ET_list = new ArrayList<>(); + + List lieu_deposable_1_conditions_TEST_list = new ArrayList<>(); + + lieu_deposable_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + 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 lieu_depart_1_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_fin_1_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_Enigme_1_descriptions = new ArrayList<>(); + + List lieu_Enigme_1_description_1_conditions_ET_list = new ArrayList<>(); + + List lieu_Enigme_1_description_1_conditions_TEST_list = new ArrayList<>(); + + lieu_Enigme_1_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + lieu_Enigme_1_description_1_conditions_ET_list.add( + new ConditionEt(lieu_Enigme_1_description_1_conditions_TEST_list) + ); + + Condition lieu_Enigme_1_description_1_condition = new Condition(lieu_Enigme_1_description_1_conditions_ET_list); + + lieu_Enigme_1_descriptions.add( + new Description( + "lieu de depart", + lieu_Enigme_1_description_1_condition + ) + ); + + List lieu_Enigme_1_personnes = new ArrayList<>(); + lieu_Enigme_1_personnes.add(personne_Sphinx); + List lieu_Enigme_1_objets = new ArrayList<>(); + List lieu_Enigme_1_connaissances = new ArrayList<>(); + + // TODO: utiliser un search dans la liste plutot que de déclarer les objets + Lieu lieu_Enigme = new Lieu( + "Enigme", + lieu_deposable_1_condition, + lieu_depart_1_condition, + lieu_fin_1_condition, + lieu_Enigme_1_personnes, + lieu_Enigme_1_descriptions, + lieu_Enigme_1_objets, + lieu_Enigme_1_connaissances + ); + + territoire_lieux.add(lieu_Enigme); + List lieu_deposable_2_conditions_ET_list = new ArrayList<>(); + + List lieu_deposable_2_conditions_TEST_list = new ArrayList<>(); + + lieu_deposable_2_conditions_TEST_list.add( + new ConditionBoolean(false) + ); + 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 lieu_depart_2_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_fin_2_conditions_ET_list = new ArrayList<>(); + + List lieu_fin_2_conditions_TEST_list = new ArrayList<>(); + + lieu_fin_2_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + 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 lieu_Succes_2_descriptions = new ArrayList<>(); + + List lieu_Succes_2_description_1_conditions_ET_list = new ArrayList<>(); + + List lieu_Succes_2_description_1_conditions_TEST_list = new ArrayList<>(); + + lieu_Succes_2_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + lieu_Succes_2_description_1_conditions_ET_list.add( + new ConditionEt(lieu_Succes_2_description_1_conditions_TEST_list) + ); + + Condition lieu_Succes_2_description_1_condition = new Condition(lieu_Succes_2_description_1_conditions_ET_list); + + lieu_Succes_2_descriptions.add( + new Description( + "lieu succes", + lieu_Succes_2_description_1_condition + ) + ); + + List lieu_Succes_2_personnes = new ArrayList<>(); + List lieu_Succes_2_objets = new ArrayList<>(); + List lieu_Succes_2_connaissances = new ArrayList<>(); + + // TODO: utiliser un search dans la liste plutot que de déclarer les objets + Lieu lieu_Succes = new Lieu( + "Succes", + lieu_deposable_2_condition, + lieu_depart_2_condition, + lieu_fin_2_condition, + lieu_Succes_2_personnes, + lieu_Succes_2_descriptions, + lieu_Succes_2_objets, + lieu_Succes_2_connaissances + ); + + territoire_lieux.add(lieu_Succes); + List lieu_deposable_3_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_depart_3_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_fin_3_conditions_ET_list = new ArrayList<>(); + + List 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 lieu_Echec_3_descriptions = new ArrayList<>(); + + List lieu_Echec_3_description_1_conditions_ET_list = new ArrayList<>(); + + List lieu_Echec_3_description_1_conditions_TEST_list = new ArrayList<>(); + + lieu_Echec_3_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + lieu_Echec_3_description_1_conditions_ET_list.add( + new ConditionEt(lieu_Echec_3_description_1_conditions_TEST_list) + ); + + Condition lieu_Echec_3_description_1_condition = new Condition(lieu_Echec_3_description_1_conditions_ET_list); + + lieu_Echec_3_descriptions.add( + new Description( + "lieu echec", + lieu_Echec_3_description_1_condition + ) + ); + + List lieu_Echec_3_personnes = new ArrayList<>(); + List lieu_Echec_3_objets = new ArrayList<>(); + List lieu_Echec_3_connaissances = new ArrayList<>(); + + // TODO: utiliser un search dans la liste plutot que de déclarer les objets + Lieu lieu_Echec = new Lieu( + "Echec", + lieu_deposable_3_condition, + lieu_depart_3_condition, + lieu_fin_3_condition, + lieu_Echec_3_personnes, + lieu_Echec_3_descriptions, + lieu_Echec_3_objets, + lieu_Echec_3_connaissances + ); + + territoire_lieux.add(lieu_Echec); + + +// "Chemins" + +List territoire_chemins = new ArrayList<>(); + List chemin_ouvert_win_1_conditions_ET_list = new ArrayList<>(); + + List chemin_ouvert_win_1_conditions_TEST_list = new ArrayList<>(); + + chemin_ouvert_win_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_ouvert_win_1_conditions_ET_list.add( + new ConditionEt(chemin_ouvert_win_1_conditions_TEST_list) + ); + + Condition chemin_ouvert_win_1_condition = new Condition(chemin_ouvert_win_1_conditions_ET_list); + List chemin_visible_win_1_conditions_ET_list = new ArrayList<>(); + + List chemin_visible_win_1_conditions_TEST_list = new ArrayList<>(); + + chemin_visible_win_1_conditions_TEST_list.add( + new ConditionConnaissance( + connaissance_Reussite, + false + ) + ); + chemin_visible_win_1_conditions_ET_list.add( + new ConditionEt(chemin_visible_win_1_conditions_TEST_list) + ); + + Condition chemin_visible_win_1_condition = new Condition(chemin_visible_win_1_conditions_ET_list); + List chemin_obligatoire_win_1_conditions_ET_list = new ArrayList<>(); + + List chemin_obligatoire_win_1_conditions_TEST_list = new ArrayList<>(); + + chemin_obligatoire_win_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_obligatoire_win_1_conditions_ET_list.add( + new ConditionEt(chemin_obligatoire_win_1_conditions_TEST_list) + ); + + Condition chemin_obligatoire_win_1_condition = new Condition(chemin_obligatoire_win_1_conditions_ET_list); + List chemin_win_1_descriptions = new ArrayList<>(); + + List chemin_win_1_description_1_conditions_ET_list = new ArrayList<>(); + + List chemin_win_1_description_1_conditions_TEST_list = new ArrayList<>(); + + chemin_win_1_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_win_1_description_1_conditions_ET_list.add( + new ConditionEt(chemin_win_1_description_1_conditions_TEST_list) + ); + + Condition chemin_win_1_description_1_condition = new Condition(chemin_win_1_description_1_conditions_ET_list); + + chemin_win_1_descriptions.add( + new Description( + "Le chemin de la victoire !", + chemin_win_1_description_1_condition + ) + ); + + List chemin_win_1_connaissances = new ArrayList<>(); + List chemin_win_1_objets_recus = new ArrayList<>(); + List chemin_win_1_objets_conso = new ArrayList<>(); + + Chemin chemins_win = new Chemin( + "win", + lieu_Enigme, + lieu_Succes, + chemin_ouvert_win_1_condition, + chemin_visible_win_1_condition, + chemin_obligatoire_win_1_condition, + chemin_win_1_connaissances, + chemin_win_1_objets_recus, + chemin_win_1_objets_conso, + chemin_win_1_descriptions + ); + + territoire_chemins.add(chemins_win); + List chemin_ouvert_loose_2_conditions_ET_list = new ArrayList<>(); + + List chemin_ouvert_loose_2_conditions_TEST_list = new ArrayList<>(); + + chemin_ouvert_loose_2_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_ouvert_loose_2_conditions_ET_list.add( + new ConditionEt(chemin_ouvert_loose_2_conditions_TEST_list) + ); + + Condition chemin_ouvert_loose_2_condition = new Condition(chemin_ouvert_loose_2_conditions_ET_list); + List chemin_visible_loose_2_conditions_ET_list = new ArrayList<>(); + + List chemin_visible_loose_2_conditions_TEST_list = new ArrayList<>(); + + chemin_visible_loose_2_conditions_TEST_list.add( + new ConditionObjet( + objet_tentative, + "==", + 0 + ) + ); + chemin_visible_loose_2_conditions_ET_list.add( + new ConditionEt(chemin_visible_loose_2_conditions_TEST_list) + ); + + Condition chemin_visible_loose_2_condition = new Condition(chemin_visible_loose_2_conditions_ET_list); + List chemin_obligatoire_loose_2_conditions_ET_list = new ArrayList<>(); + + List chemin_obligatoire_loose_2_conditions_TEST_list = new ArrayList<>(); + + chemin_obligatoire_loose_2_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_obligatoire_loose_2_conditions_ET_list.add( + new ConditionEt(chemin_obligatoire_loose_2_conditions_TEST_list) + ); + + Condition chemin_obligatoire_loose_2_condition = new Condition(chemin_obligatoire_loose_2_conditions_ET_list); + List chemin_loose_2_descriptions = new ArrayList<>(); + + List chemin_loose_2_description_1_conditions_ET_list = new ArrayList<>(); + + List chemin_loose_2_description_1_conditions_TEST_list = new ArrayList<>(); + + chemin_loose_2_description_1_conditions_TEST_list.add( + new ConditionBoolean(true) + ); + chemin_loose_2_description_1_conditions_ET_list.add( + new ConditionEt(chemin_loose_2_description_1_conditions_TEST_list) + ); + + Condition chemin_loose_2_description_1_condition = new Condition(chemin_loose_2_description_1_conditions_ET_list); + + chemin_loose_2_descriptions.add( + new Description( + "Le chemin de la loose !", + chemin_loose_2_description_1_condition + ) + ); + + List chemin_loose_2_connaissances = new ArrayList<>(); + List chemin_loose_2_objets_recus = new ArrayList<>(); + List chemin_loose_2_objets_conso = new ArrayList<>(); + + Chemin chemins_loose = new Chemin( + "loose", + lieu_Enigme, + lieu_Echec, + chemin_ouvert_loose_2_condition, + chemin_visible_loose_2_condition, + chemin_obligatoire_loose_2_condition, + chemin_loose_2_connaissances, + chemin_loose_2_objets_recus, + chemin_loose_2_objets_conso, + chemin_loose_2_descriptions + ); + + territoire_chemins.add(chemins_loose); + + 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(); + +} +} diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl index 4093a05..b2d9e8f 100644 --- a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl @@ -151,7 +151,7 @@ - + @@ -831,7 +831,7 @@ - + @@ -1607,7 +1607,7 @@ - + @@ -1624,24 +1624,25 @@ - + + + + + + - - - - - + - + @@ -1651,7 +1652,7 @@ - + @@ -1663,7 +1664,7 @@ - + @@ -1676,7 +1677,7 @@ - + @@ -1684,18 +1685,19 @@ - + - + - + + @@ -1706,7 +1708,7 @@ - + @@ -1718,7 +1720,7 @@ - + @@ -1732,7 +1734,7 @@ - + @@ -1740,7 +1742,7 @@ - + @@ -1748,7 +1750,7 @@ - + @@ -1758,7 +1760,7 @@ - + @@ -1770,7 +1772,7 @@ - + @@ -1780,19 +1782,7 @@ - - - - - - - - - - - - - + @@ -1803,6 +1793,15 @@ + + + + + + + + + @@ -1821,7 +1820,7 @@ - + @@ -1865,7 +1864,7 @@ - + @@ -1889,7 +1888,7 @@ - + @@ -1904,7 +1903,7 @@ - + @@ -1939,7 +1938,7 @@ - + @@ -1969,7 +1968,7 @@ - + @@ -1992,13 +1991,13 @@ - + - + @@ -2010,7 +2009,7 @@ - + @@ -2020,7 +2019,7 @@ - + @@ -2047,44 +2046,67 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -2094,7 +2116,7 @@ - + @@ -2125,7 +2147,7 @@ - + @@ -2133,7 +2155,7 @@ - + @@ -2141,7 +2163,7 @@ - + @@ -2149,15 +2171,7 @@ - - - - - - - - - + @@ -2165,10 +2179,18 @@ - + - + + + + + + + + + @@ -2180,13 +2202,13 @@ - + - + @@ -2215,7 +2237,7 @@ - + @@ -2244,7 +2266,7 @@ - + @@ -2256,7 +2278,7 @@ - + @@ -2266,7 +2288,7 @@ - + @@ -2293,7 +2315,7 @@ - + @@ -2303,7 +2325,7 @@ - + @@ -2330,7 +2352,7 @@ - + @@ -2340,7 +2362,7 @@ - + @@ -2366,12 +2388,12 @@ - + - + @@ -2379,7 +2401,7 @@ - + @@ -2387,7 +2409,7 @@ - + @@ -2395,7 +2417,7 @@ - + @@ -2403,7 +2425,7 @@ - + @@ -2423,13 +2445,6 @@ - - - - - - - @@ -3168,7 +3183,7 @@ - + @@ -3223,21 +3238,18 @@ - - - - - - - - - + + + + + + @@ -3347,7 +3359,7 @@ - + @@ -3577,12 +3589,12 @@
-
+
-
+
@@ -3847,2682 +3859,2682 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ -
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ -
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ -
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ -
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -6541,433 +6553,433 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
+
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
+ +
+
+
+ + +
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
+
+ + +
+
+
+ + +
+
- -
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
- -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
+ +
+
- + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
-
-
- - -
-
-
- - -
-
+
- -
-
+ +
+
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ -
-
-
+
+
+
- -
-
+ +
+
- -
-
+ +
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -6976,153 +6988,153 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -7131,1114 +7143,1154 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
- -
-
-
+ +
+
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - +
-
+
+
+ + +
+
- -
+ +
-
+
- +
-
+
- -
-
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
- -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
+ +
+
- + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
+ +
- -
-
+ +
+
- -
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
-
+
- -
-
-
- - -
-
+ +
+
- -
-
+ +
+
- -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
+ +
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
+ +
+
+
+ + +
-
+
- -
+ +
+
+
+ + +
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- -
-
-
- - -
-
-
- - -
-
-
- - -
-
+ +
+
- + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ +
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
- -
-
+ +
+
- -
-
-
+ +
+
+
- -
-
-
+ +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl index 4f735ad..db9e23c 100644 --- a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -31,7 +31,7 @@ List jeu_objets = new ArrayList<>(); [comment Connaissances /] // "Connaissances" -List jeu_connaissances = new ArrayList<>(); +List jeu_connaissances = new ArrayList<>(); [for (c : Connaissance | jeu.connaissances)] [print_descriptions(c.descriptions, 'connaissance_' + c.nom.nom)/] @@ -120,7 +120,7 @@ List territoire_lieux = new ArrayList<>(); List lieu_[l.nom.nom/]_[i/]_personnes = new ArrayList<>(); [for (p : Nom | l.personnes)] - lieu_[l.nom.nom/]_[i/]_personnes.add(objet_[p.nom/]); + lieu_[l.nom.nom/]_[i/]_personnes.add(personne_[p.nom/]); [/for] List lieu_[l.nom.nom/]_[i/]_objets = new ArrayList<>(); [for (o : Nom | l.objets)] @@ -186,17 +186,31 @@ List territoire_chemins = new ArrayList<>(); territoire_chemins.add(chemins_[ch.nom.nom/]); [/for] + 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(); + } } [/file] [/template] [template public print_condition(c : Condition, name: String) post (trim()) ] -List [name/]_conditions_ET = new ArrayList<>(); +List [name/]_conditions_ET_list = new ArrayList<>(); [for (cET : ConditionEt | c.condition)] +List [name/]_conditions_TEST_list = new ArrayList<>(); + [for (cTEST : ConditionTest | cET.conditionTest)] - [name/]_conditions_ET_[i/].add( + [name/]_conditions_TEST_list.add( [if (cTEST.oclIsKindOf(ConditionBoolean))] [let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)] new ConditionBoolean([cBOOL.valeur/]) @@ -205,7 +219,7 @@ List [name/]_conditions_ET = new ArrayList<>(); [let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)] new ConditionConnaissance( connaissance_[cCONN.connaissance/], - [if (cCONN.connaissance.startsWith('!'))]true[else]false[/if] + [if (cCONN.negation = '!')]true[else]false[/if] ) [/let] [elseif (cTEST.oclIsKindOf(ConditionObjet))] @@ -218,12 +232,13 @@ List [name/]_conditions_ET = new ArrayList<>(); [/let] [/if] ); - [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]); - [/for] + [name/]_conditions_ET_list.add( + new ConditionEt([name/]_conditions_TEST_list) + ); [/for] -Condition [name/]_condition = new Condition([name/]_conditions_ET); +Condition [name/]_condition = new Condition([name/]_conditions_ET_list); [/template] [template public print_descriptions(ds : OrderedSet(Description), name: String) post (trim()) ] @@ -247,16 +262,18 @@ List [name/]_actions = new ArrayList<>(); [for (a : Action | as)] [print_condition(a.visible, name + '_action_visible_' + i.toString())/] [print_condition(a.finInteraction, name + '_action_fin_' + i.toString())/] - [print_descriptions(a.descriptions, name + '_' + i.toString())/] + [print_descriptions(a.descriptions, name + '_action_' + i.toString())/] List [name/]_action_[i/]_connaissances = new ArrayList<>(); [for (c : Nom | a.connaissances)] [name/]_action_[i/]_connaissances.add(connaissance_[c.nom/]); [/for] List [name/]_action_[i/]_objets_conso = new ArrayList<>(); - [for (c : Nom | a.objetsConso)] - [name/]_action_[i/]_objets_conso.add(objet_[c.nom/]); - [/for] + [let test : String = name + '_action_' + i + '_objets_conso'] // TODO: OMG C DÉGUEULASSE -> LE FAIRE PARTOUT + [for (c : Nom | a.objetsConso)] + [test/].add(objet_[c.nom/]); + [/for] + [/let] List [name/]_action_[i/]_objets_recus = new ArrayList<>(); [for (c : Nom | a.objetsRecus)] [name/]_action_[i/]_objets_recus.add(objet_[c.nom/]); @@ -267,16 +284,16 @@ List [name/]_actions = new ArrayList<>(); [name/]_action_visible_[i/]_condition, [name/]_action_fin_[i/]_condition, [name/]_action_[i/]_connaissances, - [name/]_action_[i/]_objets_conso, [name/]_action_[i/]_objets_recus, + [name/]_action_[i/]_objets_conso, [name/]_action_[i/]_descriptions ) - ); + ); [/for] [/template] [template public print_interactions(is: OrderedSet(Interaction), name: String)] -List [name/]_interactions = new ArrayList<>(); +List [name/]_interactions = new ArrayList<>(); [for (it : Interaction | is)] [print_condition(it.visible, name + '_interaction_visible_' + i.toString())/] @@ -295,8 +312,8 @@ List [name/]_interactions = new ArrayList<>(); [name/]_interaction_[i/]_objets_recus.add(objet_[c.nom/]); [/for] - [name/]_actions.add( - new Action( + [name/]_interactions.add( + new Interaction( [name/]_interaction_visible_[i/]_condition, [name/]_interaction_[i/]_connaissances, [name/]_interaction_[i/]_objets_conso, diff --git a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl index 4f735ad..db9e23c 100644 --- a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -31,7 +31,7 @@ List jeu_objets = new ArrayList<>(); [comment Connaissances /] // "Connaissances" -List jeu_connaissances = new ArrayList<>(); +List jeu_connaissances = new ArrayList<>(); [for (c : Connaissance | jeu.connaissances)] [print_descriptions(c.descriptions, 'connaissance_' + c.nom.nom)/] @@ -120,7 +120,7 @@ List territoire_lieux = new ArrayList<>(); List lieu_[l.nom.nom/]_[i/]_personnes = new ArrayList<>(); [for (p : Nom | l.personnes)] - lieu_[l.nom.nom/]_[i/]_personnes.add(objet_[p.nom/]); + lieu_[l.nom.nom/]_[i/]_personnes.add(personne_[p.nom/]); [/for] List lieu_[l.nom.nom/]_[i/]_objets = new ArrayList<>(); [for (o : Nom | l.objets)] @@ -186,17 +186,31 @@ List territoire_chemins = new ArrayList<>(); territoire_chemins.add(chemins_[ch.nom.nom/]); [/for] + 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(); + } } [/file] [/template] [template public print_condition(c : Condition, name: String) post (trim()) ] -List [name/]_conditions_ET = new ArrayList<>(); +List [name/]_conditions_ET_list = new ArrayList<>(); [for (cET : ConditionEt | c.condition)] +List [name/]_conditions_TEST_list = new ArrayList<>(); + [for (cTEST : ConditionTest | cET.conditionTest)] - [name/]_conditions_ET_[i/].add( + [name/]_conditions_TEST_list.add( [if (cTEST.oclIsKindOf(ConditionBoolean))] [let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)] new ConditionBoolean([cBOOL.valeur/]) @@ -205,7 +219,7 @@ List [name/]_conditions_ET = new ArrayList<>(); [let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)] new ConditionConnaissance( connaissance_[cCONN.connaissance/], - [if (cCONN.connaissance.startsWith('!'))]true[else]false[/if] + [if (cCONN.negation = '!')]true[else]false[/if] ) [/let] [elseif (cTEST.oclIsKindOf(ConditionObjet))] @@ -218,12 +232,13 @@ List [name/]_conditions_ET = new ArrayList<>(); [/let] [/if] ); - [name/]_conditions_ET.add([name/]_conditions_TEST_[i/]); - [/for] + [name/]_conditions_ET_list.add( + new ConditionEt([name/]_conditions_TEST_list) + ); [/for] -Condition [name/]_condition = new Condition([name/]_conditions_ET); +Condition [name/]_condition = new Condition([name/]_conditions_ET_list); [/template] [template public print_descriptions(ds : OrderedSet(Description), name: String) post (trim()) ] @@ -247,16 +262,18 @@ List [name/]_actions = new ArrayList<>(); [for (a : Action | as)] [print_condition(a.visible, name + '_action_visible_' + i.toString())/] [print_condition(a.finInteraction, name + '_action_fin_' + i.toString())/] - [print_descriptions(a.descriptions, name + '_' + i.toString())/] + [print_descriptions(a.descriptions, name + '_action_' + i.toString())/] List [name/]_action_[i/]_connaissances = new ArrayList<>(); [for (c : Nom | a.connaissances)] [name/]_action_[i/]_connaissances.add(connaissance_[c.nom/]); [/for] List [name/]_action_[i/]_objets_conso = new ArrayList<>(); - [for (c : Nom | a.objetsConso)] - [name/]_action_[i/]_objets_conso.add(objet_[c.nom/]); - [/for] + [let test : String = name + '_action_' + i + '_objets_conso'] // TODO: OMG C DÉGUEULASSE -> LE FAIRE PARTOUT + [for (c : Nom | a.objetsConso)] + [test/].add(objet_[c.nom/]); + [/for] + [/let] List [name/]_action_[i/]_objets_recus = new ArrayList<>(); [for (c : Nom | a.objetsRecus)] [name/]_action_[i/]_objets_recus.add(objet_[c.nom/]); @@ -267,16 +284,16 @@ List [name/]_actions = new ArrayList<>(); [name/]_action_visible_[i/]_condition, [name/]_action_fin_[i/]_condition, [name/]_action_[i/]_connaissances, - [name/]_action_[i/]_objets_conso, [name/]_action_[i/]_objets_recus, + [name/]_action_[i/]_objets_conso, [name/]_action_[i/]_descriptions ) - ); + ); [/for] [/template] [template public print_interactions(is: OrderedSet(Interaction), name: String)] -List [name/]_interactions = new ArrayList<>(); +List [name/]_interactions = new ArrayList<>(); [for (it : Interaction | is)] [print_condition(it.visible, name + '_interaction_visible_' + i.toString())/] @@ -295,8 +312,8 @@ List [name/]_interactions = new ArrayList<>(); [name/]_interaction_[i/]_objets_recus.add(objet_[c.nom/]); [/for] - [name/]_actions.add( - new Action( + [name/]_interactions.add( + new Interaction( [name/]_interaction_visible_[i/]_condition, [name/]_interaction_[i/]_connaissances, [name/]_interaction_[i/]_objets_conso, diff --git a/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin b/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin index 047e7921261195f195cccce28d3a8c129b867181..df57e17ce4af2b03f3841c7a1c1a342688f02104 100644 GIT binary patch delta 64 zcmdlhwO5Kaz?+#xgn@&DgF&pcYa{P_R%Rf*`9G^43z!kWrOO0jOm5&Y2h+QF?7{RO G9!CH&?h@Dl delta 64 zcmdlhwO5Kaz?+#xgn@&DgTZ%N=SJT5tjs`q^M6)97BC}#OP2}6nB2f)4yJeU*n{am GJdOZr^%UX& diff --git a/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin b/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin index e63c5c0393abefc69c339ed0810f733fe09598a3..5f28e94221a74e08b0532ac4070c9349837962eb 100644 GIT binary patch delta 64 zcmaDO_(qU7z?+#xgn@&DgF&>kYa{P&W@aG0`80Dq6PV%4cApW%n5@rX4yH3X?7{SE G4o3h$yb_E6 delta 64 zcmaDO_(qU7z?+#xgn@&DgTZ%N=SJS$%*;S~^J(UKCNRU7?LH%jF