Merge branch 'master' of git.inpt.fr:tocard-inc/enseeiht/gls/projet
This commit is contained in:
commit
9d9c20a9d7
|
@ -81,7 +81,7 @@
|
|||
"lieu_in": "Enigme",
|
||||
"lieu_out": "Echec",
|
||||
"ouvert": true,
|
||||
"visible": tentatives == 0,
|
||||
"visible": tentative == 0,
|
||||
"obligatoire": true,
|
||||
"connaissances": [],
|
||||
"objets_recus": [],
|
||||
|
|
49
runtime-workspace/fr.n7.game.examples/src-gen/Action.java
Normal file
49
runtime-workspace/fr.n7.game.examples/src-gen/Action.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Action {
|
||||
Condition visible;
|
||||
List<Connaissance> connaissances;
|
||||
List<Objet> objetsRecus;
|
||||
List<Objet> objetsConso;
|
||||
Condition finInterraction;
|
||||
List<Description> descriptions;
|
||||
|
||||
public Action(
|
||||
Condition visible,
|
||||
Condition finInterraction,
|
||||
List<Connaissance> connaissances,
|
||||
List<Objet> objetsRecus,
|
||||
List<Objet> objetsConso,
|
||||
List<Description> 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";
|
||||
}
|
||||
}
|
48
runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java
Normal file
48
runtime-workspace/fr.n7.game.examples/src-gen/Chemin.java
Normal file
|
@ -0,0 +1,48 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Chemin {
|
||||
String nom;
|
||||
Lieu lieuIn;
|
||||
Lieu lieuOut;
|
||||
Condition ouvert;
|
||||
Condition visible;
|
||||
Condition obligatoire;
|
||||
List<Connaissance> connaissancesRecus;
|
||||
List<Objet> objetsRecus;
|
||||
List<Objet> objetsConso;
|
||||
List<Description> descriptions;
|
||||
|
||||
public Chemin(
|
||||
String nom,
|
||||
Lieu lieuIn,
|
||||
Lieu lieuOut,
|
||||
Condition ouvert,
|
||||
Condition visible,
|
||||
Condition obligatoire,
|
||||
List<Connaissance> connaissancesRecus,
|
||||
List<Objet> objetsRecus,
|
||||
List<Objet> objetsConso,
|
||||
List<Description> 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";
|
||||
}
|
||||
}
|
21
runtime-workspace/fr.n7.game.examples/src-gen/Condition.java
Normal file
21
runtime-workspace/fr.n7.game.examples/src-gen/Condition.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Condition {
|
||||
|
||||
List<ConditionEt> conditionEts;
|
||||
|
||||
public Condition(List<ConditionEt> conditionEts) {
|
||||
this.conditionEts = conditionEts;
|
||||
}
|
||||
|
||||
public Boolean evaluer() {
|
||||
for (ConditionEt cond : conditionEts) {
|
||||
if (cond.evaluer()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
public class ConditionBoolean implements ConditionTest {
|
||||
Boolean bool;
|
||||
|
||||
public ConditionBoolean(Boolean bool) {
|
||||
this.bool = bool;
|
||||
}
|
||||
|
||||
public Boolean evaluer() {
|
||||
return this.bool;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConditionEt {
|
||||
|
||||
List<ConditionTest> conditionTests;
|
||||
|
||||
public ConditionEt(List<ConditionTest> conditionTests) {
|
||||
this.conditionTests = conditionTests;
|
||||
}
|
||||
|
||||
public Boolean evaluer() {
|
||||
for (ConditionTest cond : conditionTests) {
|
||||
if (!cond.evaluer()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
public interface ConditionTest {
|
||||
|
||||
public Boolean evaluer();
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Connaissance {
|
||||
String nom;
|
||||
Condition visible;
|
||||
List<Description> descriptions;
|
||||
|
||||
public Connaissance(
|
||||
String nom,
|
||||
Condition visible,
|
||||
List<Description> 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 + ")";
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Explorateur {
|
||||
int taille;
|
||||
List<Connaissance> connaissances;
|
||||
List<Objet> objets;
|
||||
|
||||
public Explorateur(
|
||||
int taille,
|
||||
List<Connaissance> connaissances,
|
||||
List<Objet> 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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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<Connaissance> connaissances;
|
||||
List<Objet> objetsRecus;
|
||||
List<Objet> objetsConso;
|
||||
List<Action> actions;
|
||||
|
||||
public Interaction(
|
||||
Condition visible,
|
||||
List<Connaissance> connaissances,
|
||||
List<Objet> objetsRecus,
|
||||
List<Objet> objetsConso,
|
||||
List<Action> actions) {
|
||||
this.visible = visible;
|
||||
this.connaissances = connaissances;
|
||||
this.objetsRecus = objetsRecus;
|
||||
this.objetsConso = objetsConso;
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
void interragir(BufferedReader reader, Lieu lieu) {
|
||||
boolean arreter_interraction = false;
|
||||
|
||||
while (!arreter_interraction) {
|
||||
System.out.println(this);
|
||||
System.out.print("\nChoix : ");
|
||||
|
||||
List<Action> 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;
|
||||
}
|
||||
}
|
127
runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java
Normal file
127
runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java
Normal file
|
@ -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<Objet> objets;
|
||||
List<Connaissance> connaissances;
|
||||
List<Personne> personnes;
|
||||
List<Transformation> transformations;
|
||||
|
||||
public Jeu(
|
||||
Territoire territoire,
|
||||
List<Objet> objets,
|
||||
List<Connaissance> connaissances,
|
||||
List<Personne> personnes,
|
||||
List<Transformation> 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<Chemin> 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<Personne> 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);
|
||||
}
|
||||
}
|
36
runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java
Normal file
36
runtime-workspace/fr.n7.game.examples/src-gen/Lieu.java
Normal file
|
@ -0,0 +1,36 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Lieu {
|
||||
String nom;
|
||||
Condition deposable;
|
||||
Condition depart;
|
||||
Condition fin;
|
||||
List<Personne> personnes;
|
||||
List<Description> descriptions;
|
||||
List<Objet> objets;
|
||||
List<Connaissance> connaissances;
|
||||
|
||||
public Lieu(
|
||||
String nom,
|
||||
Condition deposable,
|
||||
Condition depart,
|
||||
Condition fin,
|
||||
List<Personne> personnes,
|
||||
List<Description> descriptions,
|
||||
List<Objet> objets,
|
||||
List<Connaissance> 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;
|
||||
}
|
||||
}
|
29
runtime-workspace/fr.n7.game.examples/src-gen/Objet.java
Normal file
29
runtime-workspace/fr.n7.game.examples/src-gen/Objet.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Objet {
|
||||
String nom;
|
||||
int taille;
|
||||
Condition visible;
|
||||
List<Description> descriptions;
|
||||
|
||||
public Objet(
|
||||
String nom,
|
||||
int taille,
|
||||
Condition visible,
|
||||
List<Description> 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 + ")";
|
||||
}
|
||||
}
|
35
runtime-workspace/fr.n7.game.examples/src-gen/Personne.java
Normal file
35
runtime-workspace/fr.n7.game.examples/src-gen/Personne.java
Normal file
|
@ -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<Interaction> interactions;
|
||||
|
||||
public Personne(
|
||||
String nom,
|
||||
Condition visible,
|
||||
Condition obligatoire,
|
||||
List<Interaction> 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;
|
||||
}
|
||||
}
|
|
@ -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<Objet> jeu_objets = new ArrayList<>();
|
|||
|
||||
List<Description> objet_tentative_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> objet_tentative_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> objet_tentative_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> objet_tentative_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Objet> jeu_objets = new ArrayList<>();
|
|||
objet_tentative_description_1_condition
|
||||
)
|
||||
);
|
||||
List<ConditionEt> objet_visible_tentative_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> objet_visible_tentative_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> objet_visible_tentative_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Objet> jeu_objets = new ArrayList<>();
|
|||
jeu_objets.add(objet_tentative);
|
||||
|
||||
// "Connaissances"
|
||||
List<Conaissance> jeu_connaissances = new ArrayList<>();
|
||||
List<Connaissance> jeu_connaissances = new ArrayList<>();
|
||||
|
||||
List<Description> connaissance_Reussite_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> connaissance_Reussite_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> connaissance_Reussite_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> connaissance_Reussite_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Conaissance> jeu_connaissances = new ArrayList<>();
|
|||
connaissance_Reussite_description_1_condition
|
||||
)
|
||||
);
|
||||
List<ConditionEt> connaissance_visible_Reussite_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> connaissance_visible_Reussite_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> connaissance_visible_Reussite_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Personne> jeu_personnes = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> personne_visible_Sphinx_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> personne_visible_Sphinx_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_visible_Sphinx_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> personne_obligatoire_Sphinx_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition personne_visible_Sphinx_1_condition = new Condition(personne_visible_Sphinx_1_conditions_ET);
|
||||
List<ConditionEt> personne_obligatoire_Sphinx_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> personne_obligatoire_Sphinx_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Interaction> personne_Sphinx_1_interactions = new ArrayList<>();
|
||||
|
||||
Condition personne_obligatoire_Sphinx_1_condition = new Condition(personne_obligatoire_Sphinx_1_conditions_ET);
|
||||
List<Action> personne_Sphinx_1_interactions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_visible_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_visible_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_visible_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Action> personne_Sphinx_1_interaction_1_actions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_visible_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_action_visible_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> 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<ConditionEt> personne_Sphinx_1_interaction_1_action_fin_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_action_fin_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> 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<Description> personne_Sphinx_1_interaction_1_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_1_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Personne> jeu_personnes = new ArrayList<>();
|
|||
personne_Sphinx_1_interaction_1_action_1_objets_recus,
|
||||
personne_Sphinx_1_interaction_1_action_1_descriptions
|
||||
)
|
||||
);
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET = new ArrayList<>();
|
||||
);
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_visible_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_action_visible_2_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> 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<ConditionEt> personne_Sphinx_1_interaction_1_action_fin_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_action_fin_2_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> 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<Description> personne_Sphinx_1_interaction_1_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> personne_Sphinx_1_interaction_1_action_2_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> personne_Sphinx_1_interaction_1_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Connaissance> personne_Sphinx_1_interaction_1_action_2_connaissances = new ArrayList<>();
|
||||
List<Objet> 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<Objet> personne_Sphinx_1_interaction_1_action_2_objets_recus = new ArrayList<>();
|
||||
|
||||
personne_Sphinx_1_interaction_1_actions.add(
|
||||
|
@ -267,8 +284,8 @@ List<Personne> 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<Personne> jeu_personnes = new ArrayList<>();
|
|||
List<Objet> personne_Sphinx_1_interaction_1_objets_conso = new ArrayList<>();
|
||||
List<Objet> 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<Personne> jeu_personnes = new ArrayList<>();
|
|||
// "Lieux"
|
||||
|
||||
List<Lieu> territoire_lieux = new ArrayList<>();
|
||||
List<ConditionEt> lieu_deposable_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_deposable_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_deposable_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> lieu_depart_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_deposable_1_condition = new Condition(lieu_deposable_1_conditions_ET);
|
||||
List<ConditionEt> lieu_depart_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_depart_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<ConditionEt> lieu_fin_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_depart_1_condition = new Condition(lieu_depart_1_conditions_ET);
|
||||
List<ConditionEt> lieu_fin_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_fin_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> lieu_Enigme_1_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> lieu_Enigme_1_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_Enigme_1_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_Enigme_1_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Lieu> territoire_lieux = new ArrayList<>();
|
|||
);
|
||||
|
||||
List<Personne> lieu_Enigme_1_personnes = new ArrayList<>();
|
||||
lieu_Enigme_1_personnes.add(objet_Sphinx);
|
||||
lieu_Enigme_1_personnes.add(personne_Sphinx);
|
||||
List<Objet> lieu_Enigme_1_objets = new ArrayList<>();
|
||||
List<Connaissance> lieu_Enigme_1_connaissances = new ArrayList<>();
|
||||
|
||||
|
@ -372,52 +393,56 @@ List<Lieu> territoire_lieux = new ArrayList<>();
|
|||
);
|
||||
|
||||
territoire_lieux.add(lieu_Enigme);
|
||||
List<ConditionEt> lieu_deposable_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_deposable_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_deposable_2_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> lieu_depart_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_deposable_2_condition = new Condition(lieu_deposable_2_conditions_ET);
|
||||
List<ConditionEt> lieu_depart_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_depart_2_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<ConditionEt> lieu_fin_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_depart_2_condition = new Condition(lieu_depart_2_conditions_ET);
|
||||
List<ConditionEt> lieu_fin_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_fin_2_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> lieu_Succes_2_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> lieu_Succes_2_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_Succes_2_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_Succes_2_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Lieu> territoire_lieux = new ArrayList<>();
|
|||
);
|
||||
|
||||
territoire_lieux.add(lieu_Succes);
|
||||
List<ConditionEt> lieu_deposable_3_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_deposable_3_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_deposable_3_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> lieu_depart_3_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_deposable_3_condition = new Condition(lieu_deposable_3_conditions_ET);
|
||||
List<ConditionEt> lieu_depart_3_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_depart_3_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<ConditionEt> lieu_fin_3_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition lieu_depart_3_condition = new Condition(lieu_depart_3_conditions_ET);
|
||||
List<ConditionEt> lieu_fin_3_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> lieu_fin_3_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> lieu_Echec_3_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> lieu_Echec_3_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> lieu_Echec_3_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> lieu_Echec_3_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Lieu> territoire_lieux = new ArrayList<>();
|
|||
// "Chemins"
|
||||
|
||||
List<Chemin> territoire_chemins = new ArrayList<>();
|
||||
List<ConditionEt> chemin_ouvert_win_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> chemin_ouvert_win_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> chemin_ouvert_win_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> chemin_visible_win_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition chemin_ouvert_win_1_condition = new Condition(chemin_ouvert_win_1_conditions_ET);
|
||||
List<ConditionEt> chemin_visible_win_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> chemin_visible_win_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<ConditionEt> chemin_obligatoire_win_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition chemin_visible_win_1_condition = new Condition(chemin_visible_win_1_conditions_ET);
|
||||
List<ConditionEt> chemin_obligatoire_win_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> chemin_obligatoire_win_1_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> chemin_win_1_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> chemin_win_1_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> chemin_win_1_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> chemin_win_1_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Chemin> territoire_chemins = new ArrayList<>();
|
|||
);
|
||||
|
||||
List<Connaissance> chemin_win_1_connaissances = new ArrayList<>();
|
||||
List<Objet> chemin_win_1_objet_recus = new ArrayList<>();
|
||||
List<Objet> chemin_win_1_objet_conso = new ArrayList<>();
|
||||
List<Objet> chemin_win_1_objets_recus = new ArrayList<>();
|
||||
List<Objet> 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<ConditionEt> chemin_ouvert_loose_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> chemin_ouvert_loose_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> chemin_ouvert_loose_2_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<ConditionEt> chemin_visible_loose_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition chemin_ouvert_loose_2_condition = new Condition(chemin_ouvert_loose_2_conditions_ET);
|
||||
List<ConditionEt> chemin_visible_loose_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> chemin_visible_loose_2_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<ConditionEt> chemin_obligatoire_loose_2_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
Condition chemin_visible_loose_2_condition = new Condition(chemin_visible_loose_2_conditions_ET);
|
||||
List<ConditionEt> chemin_obligatoire_loose_2_conditions_ET = new ArrayList<>();
|
||||
List<ConditionTest> chemin_obligatoire_loose_2_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> 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<Description> chemin_loose_2_descriptions = new ArrayList<>();
|
||||
|
||||
List<ConditionEt> chemin_loose_2_description_1_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> chemin_loose_2_description_1_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
List<ConditionTest> chemin_loose_2_description_1_conditions_TEST_1 = new ArrayList<>();
|
||||
List<ConditionTest> 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<Chemin> territoire_chemins = new ArrayList<>();
|
|||
);
|
||||
|
||||
List<Connaissance> chemin_loose_2_connaissances = new ArrayList<>();
|
||||
List<Objet> chemin_loose_2_objet_recus = new ArrayList<>();
|
||||
List<Objet> chemin_loose_2_objet_conso = new ArrayList<>();
|
||||
List<Objet> chemin_loose_2_objets_recus = new ArrayList<>();
|
||||
List<Objet> 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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Territoire {
|
||||
List<Lieu> lieux;
|
||||
List<Chemin> chemins;
|
||||
|
||||
public Territoire(
|
||||
List<Lieu> lieux,
|
||||
List<Chemin> chemins) {
|
||||
this.lieux = lieux;
|
||||
this.chemins = chemins;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import java.util.List;
|
||||
|
||||
public class Transformation {
|
||||
Condition possible;
|
||||
List<Objet> objetsSources;
|
||||
List<Objet> objetsResultats;
|
||||
|
||||
public Transformation(
|
||||
Condition possible,
|
||||
List<Objet> objetsSources,
|
||||
List<Objet> objetsResultats) {
|
||||
this.possible = possible;
|
||||
this.objetsSources = objetsSources;
|
||||
this.objetsResultats = objetsResultats;
|
||||
}
|
||||
}
|
7
workspace/fr.n7.game.design/.classpath
Normal file
7
workspace/fr.n7.game.design/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
24
workspace/fr.n7.game.design/.project
Normal file
24
workspace/fr.n7.game.design/.project
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>fr.n7.game.design</name>
|
||||
<comment></comment>
|
||||
<projects></projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments></arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments></arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments></arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
16
workspace/fr.n7.game.design/META-INF/MANIFEST.MF
Normal file
16
workspace/fr.n7.game.design/META-INF/MANIFEST.MF
Normal file
|
@ -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
|
7
workspace/fr.n7.game.design/build.properties
Normal file
7
workspace/fr.n7.game.design/build.properties
Normal file
|
@ -0,0 +1,7 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
description/,\
|
||||
plugin.properties,\
|
||||
plugin.xml
|
10
workspace/fr.n7.game.design/description/game.odesign
Normal file
10
workspace/fr.n7.game.design/description/game.odesign
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" name="game" version="12.0.0.2017041100">
|
||||
<ownedViewpoints name="gameViewpoint" modelFileExtension="game">
|
||||
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="gameDiagram" domainClass="game::Jeu" enablePopupBars="true">
|
||||
<metamodel href="http://www.n7.fr/game/xtext/Game#/"/>
|
||||
<defaultLayer name="Default"/>
|
||||
</ownedRepresentations>
|
||||
<ownedJavaExtensions qualifiedClassName="fr.n7.game.design.Services"/>
|
||||
</ownedViewpoints>
|
||||
</description:Group>
|
174
workspace/fr.n7.game.design/enigme.game
Normal file
174
workspace/fr.n7.game.design/enigme.game
Normal file
|
@ -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": []
|
||||
}
|
3
workspace/fr.n7.game.design/plugin.properties
Normal file
3
workspace/fr.n7.game.design/plugin.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
pluginName = fr.n7.game.design
|
||||
providerName = Eclipse Modeling Project
|
||||
viewpointName = MyViewpoint
|
10
workspace/fr.n7.game.design/plugin.xml
Normal file
10
workspace/fr.n7.game.design/plugin.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.0"?>
|
||||
<plugin>
|
||||
<extension point="org.eclipse.sirius.componentization">
|
||||
<component class="fr.n7.game.design.Activator"
|
||||
id="fr.n7.game.design"
|
||||
name="game">
|
||||
</component>
|
||||
</extension>
|
||||
</plugin>
|
|
@ -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<Viewpoint> 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<Viewpoint>();
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
18
workspace/fr.n7.game.samples/.project
Normal file
18
workspace/fr.n7.game.samples/.project
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>fr.n7.game.samples</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.sirius.nature.modelingproject</nature>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
174
workspace/fr.n7.game.samples/enigme.game
Normal file
174
workspace/fr.n7.game.samples/enigme.game
Normal file
|
@ -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": []
|
||||
}
|
7
workspace/fr.n7.game.samples/representations.aird
Normal file
7
workspace/fr.n7.game.samples/representations.aird
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description" uid="_WNQy0Fm_EeytLbweae6YqA" selectedViews="_sdfMQFnCEeysL9251qqO9A" version="14.3.1.202003261200">
|
||||
<semanticResources>enigme.game</semanticResources>
|
||||
<ownedViews xmi:type="viewpoint:DView" uid="_sdfMQFnCEeysL9251qqO9A">
|
||||
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/fr.n7.game.design/description/game.odesign#//@ownedViewpoints[name='gameViewpoint']"/>
|
||||
</ownedViews>
|
||||
</viewpoint:DAnalysis>
|
|
@ -1 +0,0 @@
|
|||
/fr/
|
File diff suppressed because it is too large
Load diff
|
@ -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) {
|
||||
|
||||
|
@ -26,7 +31,7 @@ List<Objet> jeu_objets = new ArrayList<>();
|
|||
|
||||
[comment Connaissances /]
|
||||
// "Connaissances"
|
||||
List<Conaissance> jeu_connaissances = new ArrayList<>();
|
||||
List<Connaissance> jeu_connaissances = new ArrayList<>();
|
||||
|
||||
[for (c : Connaissance | jeu.connaissances)]
|
||||
[print_descriptions(c.descriptions, 'connaissance_' + c.nom.nom)/]
|
||||
|
@ -115,7 +120,7 @@ List<Lieu> territoire_lieux = new ArrayList<>();
|
|||
|
||||
List<Personne> 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<Objet> lieu_[l.nom.nom/]_[i/]_objets = new ArrayList<>();
|
||||
[for (o : Nom | l.objets)]
|
||||
|
@ -156,44 +161,56 @@ List<Chemin> territoire_chemins = new ArrayList<>();
|
|||
[for (c : Nom | ch.connaissances)]
|
||||
chemin_[ch.nom.nom/]_[i/]_connaissances.add(connaissance_[c.nom/]);
|
||||
[/for]
|
||||
List<Objet> chemin_[ch.nom.nom/]_[i/]_objet_recus = new ArrayList<>();
|
||||
List<Objet> 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<Objet> chemin_[ch.nom.nom/]_[i/]_objet_conso = new ArrayList<>();
|
||||
List<Objet> 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/]);
|
||||
[/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<ConditionEt> [name/]_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> [name/]_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
[for (cET : ConditionEt | c.condition)]
|
||||
List<ConditionTest> [name/]_conditions_TEST_[i/] = new ArrayList<>();
|
||||
List<ConditionTest> [name/]_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
[for (cTEST : ConditionTest | cET.conditionTest)]
|
||||
[name/]_conditions_TEST_[i/].add(
|
||||
[name/]_conditions_TEST_list.add(
|
||||
[if (cTEST.oclIsKindOf(ConditionBoolean))]
|
||||
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
|
||||
new ConditionBoolean([cBOOL.valeur/])
|
||||
|
@ -202,7 +219,7 @@ List<ConditionEt> [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))]
|
||||
|
@ -215,12 +232,13 @@ List<ConditionEt> [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()) ]
|
||||
|
@ -244,16 +262,18 @@ List<Action> [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 + '_action_' + i.toString())/]
|
||||
|
||||
List<Connaissance> [name/]_action_[i/]_connaissances = new ArrayList<>();
|
||||
[for (c : Nom | a.connaissances)]
|
||||
[name/]_action_[i/]_connaissances.add(connaissance_[c.nom/]);
|
||||
[/for]
|
||||
List<Objet> [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<Objet> [name/]_action_[i/]_objets_recus = new ArrayList<>();
|
||||
[for (c : Nom | a.objetsRecus)]
|
||||
[name/]_action_[i/]_objets_recus.add(objet_[c.nom/]);
|
||||
|
@ -264,16 +284,16 @@ List<Action> [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<Action> [name/]_interactions = new ArrayList<>();
|
||||
List<Interaction> [name/]_interactions = new ArrayList<>();
|
||||
|
||||
[for (it : Interaction | is)]
|
||||
[print_condition(it.visible, name + '_interaction_visible_' + i.toString())/]
|
||||
|
@ -292,8 +312,8 @@ List<Action> [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,
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
@ -26,7 +31,7 @@ List<Objet> jeu_objets = new ArrayList<>();
|
|||
|
||||
[comment Connaissances /]
|
||||
// "Connaissances"
|
||||
List<Conaissance> jeu_connaissances = new ArrayList<>();
|
||||
List<Connaissance> jeu_connaissances = new ArrayList<>();
|
||||
|
||||
[for (c : Connaissance | jeu.connaissances)]
|
||||
[print_descriptions(c.descriptions, 'connaissance_' + c.nom.nom)/]
|
||||
|
@ -115,7 +120,7 @@ List<Lieu> territoire_lieux = new ArrayList<>();
|
|||
|
||||
List<Personne> 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<Objet> lieu_[l.nom.nom/]_[i/]_objets = new ArrayList<>();
|
||||
[for (o : Nom | l.objets)]
|
||||
|
@ -156,44 +161,56 @@ List<Chemin> territoire_chemins = new ArrayList<>();
|
|||
[for (c : Nom | ch.connaissances)]
|
||||
chemin_[ch.nom.nom/]_[i/]_connaissances.add(connaissance_[c.nom/]);
|
||||
[/for]
|
||||
List<Objet> chemin_[ch.nom.nom/]_[i/]_objet_recus = new ArrayList<>();
|
||||
List<Objet> 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<Objet> chemin_[ch.nom.nom/]_[i/]_objet_conso = new ArrayList<>();
|
||||
List<Objet> 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/]);
|
||||
[/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<ConditionEt> [name/]_conditions_ET = new ArrayList<>();
|
||||
List<ConditionEt> [name/]_conditions_ET_list = new ArrayList<>();
|
||||
|
||||
[for (cET : ConditionEt | c.condition)]
|
||||
List<ConditionTest> [name/]_conditions_TEST_[i/] = new ArrayList<>();
|
||||
List<ConditionTest> [name/]_conditions_TEST_list = new ArrayList<>();
|
||||
|
||||
[for (cTEST : ConditionTest | cET.conditionTest)]
|
||||
[name/]_conditions_TEST_[i/].add(
|
||||
[name/]_conditions_TEST_list.add(
|
||||
[if (cTEST.oclIsKindOf(ConditionBoolean))]
|
||||
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
|
||||
new ConditionBoolean([cBOOL.valeur/])
|
||||
|
@ -202,7 +219,7 @@ List<ConditionEt> [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))]
|
||||
|
@ -215,12 +232,13 @@ List<ConditionEt> [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()) ]
|
||||
|
@ -244,16 +262,18 @@ List<Action> [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 + '_action_' + i.toString())/]
|
||||
|
||||
List<Connaissance> [name/]_action_[i/]_connaissances = new ArrayList<>();
|
||||
[for (c : Nom | a.connaissances)]
|
||||
[name/]_action_[i/]_connaissances.add(connaissance_[c.nom/]);
|
||||
[/for]
|
||||
List<Objet> [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<Objet> [name/]_action_[i/]_objets_recus = new ArrayList<>();
|
||||
[for (c : Nom | a.objetsRecus)]
|
||||
[name/]_action_[i/]_objets_recus.add(objet_[c.nom/]);
|
||||
|
@ -264,16 +284,16 @@ List<Action> [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<Action> [name/]_interactions = new ArrayList<>();
|
||||
List<Interaction> [name/]_interactions = new ArrayList<>();
|
||||
|
||||
[for (it : Interaction | is)]
|
||||
[print_condition(it.visible, name + '_interaction_visible_' + i.toString())/]
|
||||
|
@ -292,8 +312,8 @@ List<Action> [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,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
/fr/
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue