From b5a2ce68a1c90309c5560b9150ab51eed2af532d Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Wed, 19 Jan 2022 10:44:51 +0100 Subject: [PATCH] feat: ajout des transformations en java --- .../fr.n7.game.examples/enigme.game | 6 +- .../fr.n7.game.examples/src-gen/Jeu.java | 9 + .../src-gen/Prototype.java | 1057 ++++--- .../src-gen/Transformation.java | 21 + .../fr.n7.game.examples/test3.game | 8 +- .../n7/game/toPrototype/main/toPrototype.emtl | 2626 ++++++++--------- .../n7/game/toPrototype/main/toPrototype.mtl | 2 +- .../n7/game/toPrototype/main/toPrototype.mtl | 2 +- .../xtext/tests/.GameParsingTest.xtendbin | Bin 3389 -> 3389 bytes .../xtext/generator/.GameGenerator.xtendbin | Bin 2284 -> 2284 bytes 10 files changed, 1990 insertions(+), 1741 deletions(-) diff --git a/runtime-workspace/fr.n7.game.examples/enigme.game b/runtime-workspace/fr.n7.game.examples/enigme.game index df0728d..fe3b326 100644 --- a/runtime-workspace/fr.n7.game.examples/enigme.game +++ b/runtime-workspace/fr.n7.game.examples/enigme.game @@ -16,7 +16,7 @@ Connaissances: - Description1: texte: "Permet de se casser de la" condition: true - + Explorateur: taille: 3 connaissances: @@ -45,7 +45,7 @@ Personnes: objets_conso: descriptions: - Description1: - texte: "la bonne reponse" + texte: "VSCode est le meilleur IDE de la terre" condition: true - Reponse_2: @@ -57,7 +57,7 @@ Personnes: - tentative descriptions: - Description1: - texte: "la mauvaise reponse" + texte: "Eclipse est le meilleur IDE de la terre" condition: true Territoire: diff --git a/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java index e1ab1b1..b7c8abb 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Jeu.java @@ -85,6 +85,13 @@ public class Jeu { } } + for (Transformation t : transformations.values()) { + if (t.possible()) { + System.out.println("[" + choix.size() + "] " + t); + choix.add(t); + } + } + try { System.out.print("\nChoix : "); selection = Integer.parseInt(reader.readLine()); @@ -96,6 +103,8 @@ public class Jeu { lieu = ((Chemin) choix_selection).emprunter(); } else if (choix_selection instanceof Personne) { ((Personne) choix_selection).interragir(reader); + } else if (choix_selection instanceof Transformation) { + ((Transformation) choix_selection).transformer(reader); } else { throw new UnsupportedOperationException(); } 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 ad98699..49b090e 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Prototype.java @@ -4,443 +4,656 @@ import java.util.Map; import static java.util.Map.entry; public class Prototype { - public static void main(String[] args) { +public static void main(String[] args) { - // "Objets" - Map jeu_objets = Map.ofEntries( - entry( - "warpToken", - new Objet( - "warpToken", - 1, - new Condition( - List.of( - List.of( - new ConditionBoolean( - true +// Objets +Map jeu_objets = Map.ofEntries( + entry( + "warpToken", + new Objet( + "warpToken", + 1, + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ), + new ConditionBoolean( + true + + ), + new ConditionBoolean( + true + + ) + ), + List.of( + new ConditionBoolean( + true + + ), + new ConditionBoolean( + false + + ) + ), + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + new Description( + "Description1", + "warpToken description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ) + ), + entry( + "warpTicket", + new Objet( + "warpTicket", + 1, + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + new Description( + "Description1", + "warpTicket description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ) + ), + entry( + "warpReceipt", + new Objet( + "warpReceipt", + 1, + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + new Description( + "Description1", + "warpReceipt description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ) + ) +); - ), - new ConditionBoolean( - true +// Connaissances +Map jeu_connaissances = Map.ofEntries( +); - ), - new ConditionBoolean( - true +// Transformations +Map jeu_transformations = Map.ofEntries( + entry( + "TestTransfo", + new Transformation( + "TestTransfo", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + jeu_objets.get("warpReceipt") + ), + List.of( + jeu_objets.get("warpTicket") + ) + ) + ) +); - )), - List.of( - new ConditionBoolean( - true +// Explorateur +Jeu.explorateur = new Explorateur( + 5, + new ArrayList<>(List.of( + )), + new ArrayList<>(List.of( + jeu_objets.get("warpTicket") + )) +); - ), - new ConditionBoolean( - false - - )), - List.of( - new ConditionBoolean( - false - - )))), +// Personnes +Map jeu_personnes = Map.ofEntries( + entry( + "cashier", + new Personne( + "cashier", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + new Interaction( + "Parler", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + ), + List.of( + ), + List.of( + ), + List.of( + new Action( + "Acheter", + new Condition( List.of( - new Description( - "Description1", - "warpToken description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))))))), - entry( - "warpTicket", - new Objet( - "warpTicket", - 1, - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), + List.of( + new ConditionObjet( + jeu_objets.get("warpTicket"), + "==", + 1 + ) + ) + ) + ), + new Condition( List.of( - new Description( - "Description1", - "warpTicket description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))))))), - entry( - "warpReceipt", - new Objet( - "warpReceipt", - 1, - new Condition( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + ), + List.of( + jeu_objets.get("warpToken"), + jeu_objets.get("warpReceipt") + ), + List.of( + jeu_objets.get("warpTicket") + ), + List.of( + new Description( + "Description1", + "Acheter un ticket", + new Condition( List.of( - List.of( - new ConditionBoolean( - true - - )))), + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ), + new Action( + "Quitter", + new Condition( List.of( - new Description( - "Description1", - "warpReceipt description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - ))))))))); - - // "Connaissances" - Map jeu_connaissances = Map.ofEntries(); - - // "Transformations" - Map jeu_transformations = Map.ofEntries(); - - // "Explorateur" - Jeu.explorateur = new Explorateur( - 5, - new ArrayList<>(List.of()), - new ArrayList<>(List.of( - jeu_objets.get("warpTicket")))); - - // "Personnes" - Map jeu_personnes = Map.ofEntries( - entry( - "cashier", - new Personne( - "cashier", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( List.of( - new Interaction( - "Parler", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - List.of(), - List.of(), - List.of(), - List.of( - new Action( - "Acheter", - new Condition( - List.of( - List.of( - new ConditionObjet( - jeu_objets.get( - "warpTicket"), - "==", - 1)))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - List.of(), - List.of( - jeu_objets.get("warpToken"), - jeu_objets.get("warpReceipt")), - List.of( - jeu_objets.get("warpTicket")), - List.of( - new Description( - "Description1", - "Acheter un ticket", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - ))))))), - new Action( - "Quitter", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - List.of(), - List.of(), - List.of(), - List.of( - new Description( - "Description1", - "Quitter", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - ))))))))))))); - - // "Lieux" - Map territoire_lieux = Map.ofEntries( - entry( - "preWarp", - new Lieu( - "preWarp", - new Condition( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + ), + List.of( + ), + List.of( + ), + List.of( + new Description( + "Description1", + "Quitter", + new Condition( List.of( - List.of( - new ConditionBoolean( - false + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +); - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true +// Lieux +Map territoire_lieux = Map.ofEntries( + entry( + "preWarp", + new Lieu( + "preWarp", + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + jeu_personnes.get("cashier") + ), + List.of( + new Description( + "Description1", + "preWarp description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ), + new ArrayList<>(List.of( + )), + List.of( + ) + ) + ), + entry( + "postWarp", + new Lieu( + "postWarp", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + ), + List.of( + new Description( + "Description1", + "postWarp description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ), + new ArrayList<>(List.of( + )), + List.of( + ) + ) + ), + entry( + "END", + new Lieu( + "END", + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + List.of( + ), + List.of( + new Description( + "Description1", + "END description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ), + new ArrayList<>(List.of( + )), + List.of( + ) + ) + ) +); - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false +// Chemins +Map territoire_chemins = Map.ofEntries( + entry( + "Warp", + new Chemin( + "Warp", + territoire_lieux.get("preWarp"), + territoire_lieux.get("postWarp"), + new Condition( + List.of( + List.of( + new ConditionObjet( + jeu_objets.get("warpToken"), + ">", + 0 + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + ), + List.of( + ), + List.of( + jeu_objets.get("warpToken") + ), + List.of( + new Description( + "DescriptionToken", + "Warp description (need token)", + new Condition( + List.of( + List.of( + new ConditionObjet( + jeu_objets.get("warpToken"), + "==", + 0 + ) + ) + ) + ) + ), + new Description( + "DescriptionNoToken", + "Warp description (token acquired)", + new Condition( + List.of( + List.of( + new ConditionObjet( + jeu_objets.get("warpToken"), + "==", + 1 + ) + ) + ) + ) + ) + ) + ) + ), + entry( + "EndChemin", + new Chemin( + "EndChemin", + territoire_lieux.get("postWarp"), + territoire_lieux.get("END"), + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ), + new Condition( + List.of( + List.of( + new ConditionBoolean( + false + + ) + ) + ) + ), + List.of( + ), + List.of( + ), + List.of( + ), + List.of( + new Description( + "DescriptionToken", + "END description", + new Condition( + List.of( + List.of( + new ConditionBoolean( + true + + ) + ) + ) + ) + ) + ) + ) + ) +); - )))), - List.of( - jeu_personnes.get("cashier")), - List.of( - new Description( - "Description1", - "preWarp description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true +// Territoire +Territoire jeu_territoire = new Territoire(territoire_lieux, territoire_chemins); - )))))), - new ArrayList<>(List.of()), - List.of())), - entry( - "postWarp", - new Lieu( - "postWarp", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true +// Jeu +Jeu ze_GAME = new Jeu( + jeu_territoire, + jeu_objets, + jeu_connaissances, + jeu_personnes, + jeu_transformations +); - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false +ze_GAME.jouer(); - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), - List.of(), - List.of( - new Description( - "Description1", - "postWarp description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))))), - new ArrayList<>(List.of()), - List.of())), - entry( - "END", - new Lieu( - "END", - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - List.of(), - List.of( - new Description( - "Description1", - "END description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))))), - new ArrayList<>(List.of()), - List.of()))); - - // "Chemins" - Map territoire_chemins = Map.ofEntries( - entry( - "Warp", - new Chemin( - "Warp", - territoire_lieux.get("preWarp"), - territoire_lieux.get("postWarp"), - new Condition( - List.of( - List.of( - new ConditionObjet( - jeu_objets.get("warpToken"), - ">", - 0)))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), - List.of(), - List.of(), - List.of( - jeu_objets.get("warpToken")), - List.of( - new Description( - "DescriptionToken", - "Warp description (need token)", - new Condition( - List.of( - List.of( - new ConditionObjet( - jeu_objets.get("warpToken"), - "==", - 0))))), - new Description( - "DescriptionNoToken", - "Warp description (token acquired)", - new Condition( - List.of( - List.of( - new ConditionObjet( - jeu_objets.get("warpToken"), - "==", - 1)))))))), - entry( - "EndChemin", - new Chemin( - "EndChemin", - territoire_lieux.get("postWarp"), - territoire_lieux.get("END"), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - )))), - new Condition( - List.of( - List.of( - new ConditionBoolean( - false - - )))), - List.of(), - List.of(), - List.of(), - List.of( - new Description( - "DescriptionToken", - "END description", - new Condition( - List.of( - List.of( - new ConditionBoolean( - true - - ))))))))); - - // Territoire - Territoire jeu_territoire = new Territoire(territoire_lieux, territoire_chemins); - - // Jeu - 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/Transformation.java b/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java index 3caceb0..9e9ab11 100644 --- a/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java +++ b/runtime-workspace/fr.n7.game.examples/src-gen/Transformation.java @@ -1,3 +1,4 @@ +import java.io.BufferedReader; import java.util.List; public class Transformation { @@ -16,4 +17,24 @@ public class Transformation { this.objetsSources = objetsSources; this.objetsResultats = objetsResultats; } + + public void transformer(BufferedReader reader) { + Jeu.clearScreen(); + for (Objet objet : objetsResultats) { + Jeu.explorateur.objets.add(objet); + } + for (Objet objet : objetsSources) { + Jeu.explorateur.objets.remove(objet); + } + } + + @Override + public String toString() { + return "Transformation " + this.nom; + } + + public boolean possible() { + return this.possible.evaluer() && Jeu.explorateur.objets.containsAll(this.objetsSources); + } + } diff --git a/runtime-workspace/fr.n7.game.examples/test3.game b/runtime-workspace/fr.n7.game.examples/test3.game index e0d42a9..f62377a 100644 --- a/runtime-workspace/fr.n7.game.examples/test3.game +++ b/runtime-workspace/fr.n7.game.examples/test3.game @@ -24,7 +24,13 @@ Objets: condition: true Transformations: - + - TestTransfo: + condition: true + objets_in: + - warpReceipt + objets_out: + - warpTicket + Connaissances: Explorateur: diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl index 648f011..2d1a3cd 100644 --- a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.emtl @@ -104,7 +104,7 @@ - + @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
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl index ace54d7..e0eaaf9 100644 --- a/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/bin/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -34,7 +34,7 @@ Map jeu_connaissances = Map.ofEntries( [for (c : Connaissance | jeu.connaissances)] entry( "[c.name/]", - new Objet( + new Connaissance( "[c.name/]", [print_condition(c.visible)/], [print_descriptions(c.descriptions)/] diff --git a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl index ace54d7..e0eaaf9 100644 --- a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl +++ b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/toPrototype.mtl @@ -34,7 +34,7 @@ Map jeu_connaissances = Map.ofEntries( [for (c : Connaissance | jeu.connaissances)] entry( "[c.name/]", - new Objet( + new Connaissance( "[c.name/]", [print_condition(c.visible)/], [print_descriptions(c.descriptions)/] diff --git a/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin b/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin index e32a957695736fba268d90e03fd66d442c87511d..a5916f6b7ae638c6ce9051f085b7ea848df687c8 100644 GIT binary patch delta 64 zcmdlhwO5Kaz?+#xgn@&DgW;j4@kZYFtjs`q^M6)97BC}#OP2}6nB2f)4yJeU*n{am GJdOZo0u+b< delta 64 zcmdlhwO5Kaz?+#xgn@&DgJJbvqm8`pS($