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
new file mode 100644
index 0000000..f456faf
--- /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,
+ Condition finInterraction,
+ List connaissances,
+ List objetsRecus,
+ List objetsConso,
+ 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..9702699
--- /dev/null
+++ b/runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java
@@ -0,0 +1,48 @@
+import java.util.List;
+
+public class Chemin {
+ String nom;
+ Lieu lieuIn;
+ Lieu lieuOut;
+ Condition ouvert;
+ Condition visible;
+ Condition obligatoire;
+ List connaissancesRecus;
+ List objetsRecus;
+ List objetsConso;
+ List descriptions;
+
+ public Chemin(
+ String nom,
+ Lieu lieuIn,
+ Lieu lieuOut,
+ Condition ouvert,
+ Condition visible,
+ Condition obligatoire,
+ List connaissancesRecus,
+ List objetsRecus,
+ List objetsConso,
+ List descriptions) {
+ this.nom = nom;
+ 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..c2a5fe3
--- /dev/null
+++ b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java
@@ -0,0 +1,127 @@
+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;
+ }
+
+ public static void clearScreen() {
+ System.out.print("\033[H\033[2J");
+ System.out.flush();
+ }
+
+ 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;
+
+ clearScreen();
+ System.out.println("Lieu : " + 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());
+
+ clearScreen();
+ System.out.println("Lieu : " + 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
index c0c097d..d494697 100644
--- a/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java
+++ b/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java
@@ -1,3 +1,9 @@
+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) {
@@ -6,17 +12,18 @@ 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_ET_list = new ArrayList<>();
- List objet_tentative_description_1_conditions_TEST_1 = new ArrayList<>();
+ List objet_tentative_description_1_conditions_TEST_list = new ArrayList<>();
- objet_tentative_description_1_conditions_TEST_1.add(
+ objet_tentative_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- objet_tentative_description_1_conditions_ET.add(objet_tentative_description_1_conditions_TEST_1)
+ 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);
+ Condition objet_tentative_description_1_condition = new Condition(objet_tentative_description_1_conditions_ET_list);
objet_tentative_descriptions.add(
new Description(
@@ -24,17 +31,18 @@ List jeu_objets = new ArrayList<>();
objet_tentative_description_1_condition
)
);
- List objet_visible_tentative_conditions_ET = new ArrayList<>();
+ List objet_visible_tentative_conditions_ET_list = new ArrayList<>();
- List objet_visible_tentative_conditions_TEST_1 = new ArrayList<>();
+ List objet_visible_tentative_conditions_TEST_list = new ArrayList<>();
- objet_visible_tentative_conditions_TEST_1.add(
+ objet_visible_tentative_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- objet_visible_tentative_conditions_ET.add(objet_visible_tentative_conditions_TEST_1)
+ 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);
+ Condition objet_visible_tentative_condition = new Condition(objet_visible_tentative_conditions_ET_list);
Objet objet_tentative = new Objet(
"tentative",
1,
@@ -44,21 +52,22 @@ List jeu_objets = new ArrayList<>();
jeu_objets.add(objet_tentative);
// "Connaissances"
-List jeu_connaissances = new ArrayList<>();
+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_ET_list = new ArrayList<>();
- List connaissance_Reussite_description_1_conditions_TEST_1 = new ArrayList<>();
+ List connaissance_Reussite_description_1_conditions_TEST_list = new ArrayList<>();
- connaissance_Reussite_description_1_conditions_TEST_1.add(
+ connaissance_Reussite_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- connaissance_Reussite_description_1_conditions_ET.add(connaissance_Reussite_description_1_conditions_TEST_1)
+ 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);
+ Condition connaissance_Reussite_description_1_condition = new Condition(connaissance_Reussite_description_1_conditions_ET_list);
connaissance_Reussite_descriptions.add(
new Description(
@@ -66,17 +75,18 @@ List jeu_connaissances = new ArrayList<>();
connaissance_Reussite_description_1_condition
)
);
- List connaissance_visible_Reussite_conditions_ET = new ArrayList<>();
+ List connaissance_visible_Reussite_conditions_ET_list = new ArrayList<>();
- List connaissance_visible_Reussite_conditions_TEST_1 = new ArrayList<>();
+ List connaissance_visible_Reussite_conditions_TEST_list = new ArrayList<>();
- connaissance_visible_Reussite_conditions_TEST_1.add(
+ connaissance_visible_Reussite_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- connaissance_visible_Reussite_conditions_ET.add(connaissance_visible_Reussite_conditions_TEST_1)
+ 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);
+ Condition connaissance_visible_Reussite_condition = new Condition(connaissance_visible_Reussite_conditions_ET_list);
Connaissance connaissance_Reussite = new Connaissance(
"Reussite",
connaissance_visible_Reussite_condition,
@@ -107,95 +117,99 @@ Jeu.explorateur = new Explorateur(
List jeu_personnes = new ArrayList<>();
- List personne_visible_Sphinx_1_conditions_ET = new ArrayList<>();
+ List personne_visible_Sphinx_1_conditions_ET_list = new ArrayList<>();
- List personne_visible_Sphinx_1_conditions_TEST_1 = new ArrayList<>();
+ List personne_visible_Sphinx_1_conditions_TEST_list = new ArrayList<>();
- personne_visible_Sphinx_1_conditions_TEST_1.add(
+ personne_visible_Sphinx_1_conditions_TEST_list.add(
new ConditionConnaissance(
connaissance_Reussite,
- false
+ true
)
);
- personne_visible_Sphinx_1_conditions_ET.add(personne_visible_Sphinx_1_conditions_TEST_1)
-
- personne_visible_Sphinx_1_conditions_TEST_2.add(
+ personne_visible_Sphinx_1_conditions_TEST_list.add(
new ConditionObjet(
objet_tentative,
">",
0
)
);
- personne_visible_Sphinx_1_conditions_ET.add(personne_visible_Sphinx_1_conditions_TEST_2)
+ 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<>();
- 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_list = new ArrayList<>();
- List personne_obligatoire_Sphinx_1_conditions_TEST_1 = new ArrayList<>();
-
- personne_obligatoire_Sphinx_1_conditions_TEST_1.add(
+ personne_obligatoire_Sphinx_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- personne_obligatoire_Sphinx_1_conditions_ET.add(personne_obligatoire_Sphinx_1_conditions_TEST_1)
+ 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<>();
- 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_ET_list = new ArrayList<>();
- List personne_Sphinx_1_interaction_visible_1_conditions_TEST_1 = new ArrayList<>();
+ List personne_Sphinx_1_interaction_visible_1_conditions_TEST_list = new ArrayList<>();
- personne_Sphinx_1_interaction_visible_1_conditions_TEST_1.add(
+ personne_Sphinx_1_interaction_visible_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- personne_Sphinx_1_interaction_visible_1_conditions_ET.add(personne_Sphinx_1_interaction_visible_1_conditions_TEST_1)
+ 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);
+ 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 = 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_1 = 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_1.add(
+ 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.add(personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_1)
+ 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<>();
- 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_list = 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(
+ 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.add(personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_1)
+ 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<>();
- 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_action_1_description_1_conditions_ET_list = new ArrayList<>();
- List personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>();
+ List personne_Sphinx_1_interaction_1_action_1_description_1_conditions_TEST_list = new ArrayList<>();
- personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1.add(
+ personne_Sphinx_1_interaction_1_action_1_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- personne_Sphinx_1_interaction_1_description_1_conditions_ET.add(personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1)
+ 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_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_description_1_conditions_ET);
+ 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_descriptions.add(
+ personne_Sphinx_1_interaction_1_action_1_descriptions.add(
new Description(
"la bonne reponse",
- personne_Sphinx_1_interaction_1_description_1_condition
+ personne_Sphinx_1_interaction_1_action_1_description_1_condition
)
);
@@ -213,53 +227,56 @@ List jeu_personnes = new ArrayList<>();
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_ET_list = new ArrayList<>();
- List personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1 = 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_1.add(
+ 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.add(personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1)
+ 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<>();
- 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_list = 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(
+ 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.add(personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_1)
+ 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<>();
- 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_action_2_description_1_conditions_ET_list = new ArrayList<>();
- List personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>();
+ List personne_Sphinx_1_interaction_1_action_2_description_1_conditions_TEST_list = new ArrayList<>();
- personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1.add(
+ personne_Sphinx_1_interaction_1_action_2_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- personne_Sphinx_1_interaction_1_description_1_conditions_ET.add(personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1)
+ 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_description_1_condition = new Condition(personne_Sphinx_1_interaction_1_description_1_conditions_ET);
+ 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_descriptions.add(
+ personne_Sphinx_1_interaction_1_action_2_descriptions.add(
new Description(
"la mauvaise reponse",
- personne_Sphinx_1_interaction_1_description_1_condition
+ 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_1_objets_conso.add(objet_tentative);
+ 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(
@@ -267,8 +284,8 @@ List jeu_personnes = new ArrayList<>();
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_objets_conso,
personne_Sphinx_1_interaction_1_action_2_descriptions
)
);
@@ -277,8 +294,8 @@ List jeu_personnes = 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_interactions.add(
+ new Interaction(
personne_Sphinx_1_interaction_visible_1_condition,
personne_Sphinx_1_interaction_1_connaissances,
personne_Sphinx_1_interaction_1_objets_conso,
@@ -300,52 +317,56 @@ List jeu_personnes = new ArrayList<>();
// "Lieux"
List territoire_lieux = new ArrayList<>();
- List lieu_deposable_1_conditions_ET = new ArrayList<>();
+ List lieu_deposable_1_conditions_ET_list = new ArrayList<>();
- List lieu_deposable_1_conditions_TEST_1 = new ArrayList<>();
+ List lieu_deposable_1_conditions_TEST_list = new ArrayList<>();
- lieu_deposable_1_conditions_TEST_1.add(
+ lieu_deposable_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_deposable_1_conditions_ET.add(lieu_deposable_1_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_depart_1_conditions_TEST_1 = new ArrayList<>();
-
- lieu_depart_1_conditions_TEST_1.add(
+ lieu_depart_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_depart_1_conditions_ET.add(lieu_depart_1_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_fin_1_conditions_TEST_1 = new ArrayList<>();
-
- lieu_fin_1_conditions_TEST_1.add(
+ lieu_fin_1_conditions_TEST_list.add(
new ConditionBoolean(false)
);
- lieu_fin_1_conditions_ET.add(lieu_fin_1_conditions_TEST_1)
+ 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);
+ 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 = new ArrayList<>();
+ List lieu_Enigme_1_description_1_conditions_ET_list = new ArrayList<>();
- List lieu_Enigme_1_description_1_conditions_TEST_1 = new ArrayList<>();
+ List lieu_Enigme_1_description_1_conditions_TEST_list = new ArrayList<>();
- lieu_Enigme_1_description_1_conditions_TEST_1.add(
+ lieu_Enigme_1_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_Enigme_1_description_1_conditions_ET.add(lieu_Enigme_1_description_1_conditions_TEST_1)
+ 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);
+ Condition lieu_Enigme_1_description_1_condition = new Condition(lieu_Enigme_1_description_1_conditions_ET_list);
lieu_Enigme_1_descriptions.add(
new Description(
@@ -355,7 +376,7 @@ List territoire_lieux = new ArrayList<>();
);
List lieu_Enigme_1_personnes = new ArrayList<>();
- lieu_Enigme_1_personnes.add(objet_Sphinx);
+ lieu_Enigme_1_personnes.add(personne_Sphinx);
List lieu_Enigme_1_objets = new ArrayList<>();
List lieu_Enigme_1_connaissances = new ArrayList<>();
@@ -372,52 +393,56 @@ List territoire_lieux = new ArrayList<>();
);
territoire_lieux.add(lieu_Enigme);
- List lieu_deposable_2_conditions_ET = new ArrayList<>();
+ List lieu_deposable_2_conditions_ET_list = new ArrayList<>();
- List lieu_deposable_2_conditions_TEST_1 = new ArrayList<>();
+ List lieu_deposable_2_conditions_TEST_list = new ArrayList<>();
- lieu_deposable_2_conditions_TEST_1.add(
+ lieu_deposable_2_conditions_TEST_list.add(
new ConditionBoolean(false)
);
- lieu_deposable_2_conditions_ET.add(lieu_deposable_2_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_depart_2_conditions_TEST_1 = new ArrayList<>();
-
- lieu_depart_2_conditions_TEST_1.add(
+ lieu_depart_2_conditions_TEST_list.add(
new ConditionBoolean(false)
);
- lieu_depart_2_conditions_ET.add(lieu_depart_2_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_fin_2_conditions_TEST_1 = new ArrayList<>();
-
- lieu_fin_2_conditions_TEST_1.add(
+ lieu_fin_2_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_fin_2_conditions_ET.add(lieu_fin_2_conditions_TEST_1)
+ 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);
+ 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 = new ArrayList<>();
+ List lieu_Succes_2_description_1_conditions_ET_list = new ArrayList<>();
- List lieu_Succes_2_description_1_conditions_TEST_1 = new ArrayList<>();
+ List lieu_Succes_2_description_1_conditions_TEST_list = new ArrayList<>();
- lieu_Succes_2_description_1_conditions_TEST_1.add(
+ lieu_Succes_2_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_Succes_2_description_1_conditions_ET.add(lieu_Succes_2_description_1_conditions_TEST_1)
+ 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);
+ Condition lieu_Succes_2_description_1_condition = new Condition(lieu_Succes_2_description_1_conditions_ET_list);
lieu_Succes_2_descriptions.add(
new Description(
@@ -443,52 +468,56 @@ List territoire_lieux = new ArrayList<>();
);
territoire_lieux.add(lieu_Succes);
- List lieu_deposable_3_conditions_ET = new ArrayList<>();
+ List lieu_deposable_3_conditions_ET_list = new ArrayList<>();
- List lieu_deposable_3_conditions_TEST_1 = new ArrayList<>();
+ List lieu_deposable_3_conditions_TEST_list = new ArrayList<>();
- lieu_deposable_3_conditions_TEST_1.add(
+ lieu_deposable_3_conditions_TEST_list.add(
new ConditionBoolean(false)
);
- lieu_deposable_3_conditions_ET.add(lieu_deposable_3_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_depart_3_conditions_TEST_1 = new ArrayList<>();
-
- lieu_depart_3_conditions_TEST_1.add(
+ lieu_depart_3_conditions_TEST_list.add(
new ConditionBoolean(false)
);
- lieu_depart_3_conditions_ET.add(lieu_depart_3_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List lieu_fin_3_conditions_TEST_1 = new ArrayList<>();
-
- lieu_fin_3_conditions_TEST_1.add(
+ lieu_fin_3_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_fin_3_conditions_ET.add(lieu_fin_3_conditions_TEST_1)
+ 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);
+ 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 = new ArrayList<>();
+ List lieu_Echec_3_description_1_conditions_ET_list = new ArrayList<>();
- List lieu_Echec_3_description_1_conditions_TEST_1 = new ArrayList<>();
+ List lieu_Echec_3_description_1_conditions_TEST_list = new ArrayList<>();
- lieu_Echec_3_description_1_conditions_TEST_1.add(
+ lieu_Echec_3_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- lieu_Echec_3_description_1_conditions_ET.add(lieu_Echec_3_description_1_conditions_TEST_1)
+ 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);
+ Condition lieu_Echec_3_description_1_condition = new Condition(lieu_Echec_3_description_1_conditions_ET_list);
lieu_Echec_3_descriptions.add(
new Description(
@@ -519,55 +548,59 @@ List territoire_lieux = new ArrayList<>();
// "Chemins"
List territoire_chemins = new ArrayList<>();
- List chemin_ouvert_win_1_conditions_ET = new ArrayList<>();
+ List chemin_ouvert_win_1_conditions_ET_list = new ArrayList<>();
- List chemin_ouvert_win_1_conditions_TEST_1 = new ArrayList<>();
+ List chemin_ouvert_win_1_conditions_TEST_list = new ArrayList<>();
- chemin_ouvert_win_1_conditions_TEST_1.add(
+ chemin_ouvert_win_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_ouvert_win_1_conditions_ET.add(chemin_ouvert_win_1_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List chemin_visible_win_1_conditions_TEST_1 = new ArrayList<>();
-
- chemin_visible_win_1_conditions_TEST_1.add(
+ chemin_visible_win_1_conditions_TEST_list.add(
new ConditionConnaissance(
connaissance_Reussite,
false
)
);
- chemin_visible_win_1_conditions_ET.add(chemin_visible_win_1_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List chemin_obligatoire_win_1_conditions_TEST_1 = new ArrayList<>();
-
- chemin_obligatoire_win_1_conditions_TEST_1.add(
+ chemin_obligatoire_win_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_obligatoire_win_1_conditions_ET.add(chemin_obligatoire_win_1_conditions_TEST_1)
+ 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);
+ 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 = new ArrayList<>();
+ List chemin_win_1_description_1_conditions_ET_list = new ArrayList<>();
- List chemin_win_1_description_1_conditions_TEST_1 = new ArrayList<>();
+ List chemin_win_1_description_1_conditions_TEST_list = new ArrayList<>();
- chemin_win_1_description_1_conditions_TEST_1.add(
+ chemin_win_1_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_win_1_description_1_conditions_ET.add(chemin_win_1_description_1_conditions_TEST_1)
+ 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);
+ Condition chemin_win_1_description_1_condition = new Condition(chemin_win_1_description_1_conditions_ET_list);
chemin_win_1_descriptions.add(
new Description(
@@ -577,73 +610,77 @@ List territoire_chemins = new ArrayList<>();
);
List chemin_win_1_connaissances = new ArrayList<>();
- List chemin_win_1_objet_recus = new ArrayList<>();
- List chemin_win_1_objet_conso = new ArrayList<>();
+ List chemin_win_1_objets_recus = new ArrayList<>();
+ List chemin_win_1_objets_conso = new ArrayList<>();
- Chemin chemins_win new Chemin(
+ 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_connaissances,
chemin_win_1_objets_recus,
chemin_win_1_objets_conso,
- chemin_win_1_descriptions,
+ chemin_win_1_descriptions
);
territoire_chemins.add(chemins_win);
- List chemin_ouvert_loose_2_conditions_ET = new ArrayList<>();
+ List chemin_ouvert_loose_2_conditions_ET_list = new ArrayList<>();
- List chemin_ouvert_loose_2_conditions_TEST_1 = new ArrayList<>();
+ List chemin_ouvert_loose_2_conditions_TEST_list = new ArrayList<>();
- chemin_ouvert_loose_2_conditions_TEST_1.add(
+ chemin_ouvert_loose_2_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_ouvert_loose_2_conditions_ET.add(chemin_ouvert_loose_2_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List chemin_visible_loose_2_conditions_TEST_1 = new ArrayList<>();
-
- chemin_visible_loose_2_conditions_TEST_1.add(
+ chemin_visible_loose_2_conditions_TEST_list.add(
new ConditionObjet(
- objet_tentatives,
+ objet_tentative,
"==",
0
)
);
- chemin_visible_loose_2_conditions_ET.add(chemin_visible_loose_2_conditions_TEST_1)
+ 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<>();
- 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_list = new ArrayList<>();
- List chemin_obligatoire_loose_2_conditions_TEST_1 = new ArrayList<>();
-
- chemin_obligatoire_loose_2_conditions_TEST_1.add(
+ chemin_obligatoire_loose_2_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_obligatoire_loose_2_conditions_ET.add(chemin_obligatoire_loose_2_conditions_TEST_1)
+ 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);
+ 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 = new ArrayList<>();
+ List chemin_loose_2_description_1_conditions_ET_list = new ArrayList<>();
- List chemin_loose_2_description_1_conditions_TEST_1 = new ArrayList<>();
+ List chemin_loose_2_description_1_conditions_TEST_list = new ArrayList<>();
- chemin_loose_2_description_1_conditions_TEST_1.add(
+ chemin_loose_2_description_1_conditions_TEST_list.add(
new ConditionBoolean(true)
);
- chemin_loose_2_description_1_conditions_ET.add(chemin_loose_2_description_1_conditions_TEST_1)
+ 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);
+ Condition chemin_loose_2_description_1_condition = new Condition(chemin_loose_2_description_1_conditions_ET_list);
chemin_loose_2_descriptions.add(
new Description(
@@ -653,23 +690,35 @@ List territoire_chemins = new ArrayList<>();
);
List chemin_loose_2_connaissances = new ArrayList<>();
- List chemin_loose_2_objet_recus = new ArrayList<>();
- List chemin_loose_2_objet_conso = new ArrayList<>();
+ List chemin_loose_2_objets_recus = new ArrayList<>();
+ List chemin_loose_2_objets_conso = new ArrayList<>();
- Chemin chemins_loose new Chemin(
+ 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_connaissances,
chemin_loose_2_objets_recus,
chemin_loose_2_objets_conso,
- chemin_loose_2_descriptions,
+ 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/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.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
+
+
+
+
+