feat: 🔥 fin du prototyyyype java
This commit is contained in:
parent
7afc1b4f7c
commit
d1e70947ce
|
@ -8,4 +8,9 @@ public class Description {
|
|||
this.texte = texte;
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.texte;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,14 +22,14 @@ public class Interaction {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
String res = "";
|
||||
String res = "Interraction :";
|
||||
int k = 0;
|
||||
for (Action a : i.actions) {
|
||||
for (Action a : this.actions) {
|
||||
if (a.visible.evaluer()) {
|
||||
res += k + " " + a + "\n";
|
||||
res += "\n" + k + " " + a;
|
||||
k++;
|
||||
}
|
||||
}
|
||||
return super.toString();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class Jeu {
|
|||
if (p.visible.evaluer() && p.obligatoire.evaluer()) {
|
||||
for (Interaction i : p.interractions) {
|
||||
if (i.visible.evaluer()) {
|
||||
System.out.println(i);
|
||||
boolean arreter_interraction = false;
|
||||
while (!arreter_interraction) {
|
||||
List<Action> actions_choix = new ArrayList<>();
|
||||
|
@ -94,15 +95,29 @@ public class Jeu {
|
|||
}
|
||||
|
||||
if (!chemin_pris) {
|
||||
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(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(p);
|
||||
k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int choix = 0;
|
||||
try {
|
||||
choix = Integer.parseInt(reader.readLine());
|
||||
|
@ -111,7 +126,11 @@ public class Jeu {
|
|||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
lieu = chemins_choix.get(choix).lieuOut;
|
||||
if (choix < chemins_choix.size()) {
|
||||
lieu = chemins_choix.get(choix).lieuOut;
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,26 +206,38 @@ public class Jeu {
|
|||
|
||||
connaissances_action_reussite.add(reussite_connaissance);
|
||||
|
||||
List<Description> action_reussite_descriptions = new ArrayList<>();
|
||||
|
||||
action_reussite_descriptions.add(new Description(
|
||||
"Wsh jveux réussir, rwwwwwit *TOCC* NOICE",
|
||||
vraie));
|
||||
|
||||
Action action_reussite = new Action(
|
||||
vraie,
|
||||
connaissances_action_reussite,
|
||||
new ArrayList<>(),
|
||||
new ArrayList<>(),
|
||||
vraie,
|
||||
new ArrayList<>());
|
||||
action_reussite_descriptions);
|
||||
sphinx_interaction_actions.add(action_reussite);
|
||||
|
||||
List<Objet> objets_action_echec = new ArrayList<>();
|
||||
|
||||
objets_action_echec.add(tentative_objet);
|
||||
|
||||
List<Description> action_echec_descriptions = new ArrayList<>();
|
||||
|
||||
action_echec_descriptions.add(new Description(
|
||||
"Vive la défaite ! dommage (PS: JSON c B1 hein) :)",
|
||||
vraie));
|
||||
|
||||
Action action_echec = new Action(
|
||||
vraie,
|
||||
new ArrayList<>(),
|
||||
new ArrayList<>(),
|
||||
objets_action_echec,
|
||||
vraie,
|
||||
new ArrayList<>());
|
||||
action_echec_descriptions);
|
||||
sphinx_interaction_actions.add(action_echec);
|
||||
|
||||
Interaction sphinx_interaction = new Interaction(
|
||||
|
|
Loading…
Reference in a new issue