diff --git a/JAVA/PROJET-PMT_STRI1A/bin/.classpath b/JAVA/PROJET-PMT_STRI1A/bin/.classpath
new file mode 100644
index 0000000..ded1168
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/bin/.classpath
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/.project b/JAVA/PROJET-PMT_STRI1A/bin/.project
new file mode 100644
index 0000000..94823b7
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/bin/.project
@@ -0,0 +1,17 @@
+
+
+ projet
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/.settings/org.eclipse.jdt.core.prefs b/JAVA/PROJET-PMT_STRI1A/bin/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..a54bb93
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/bin/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=10
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=10
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/java-json.jar b/JAVA/PROJET-PMT_STRI1A/bin/java-json.jar
new file mode 100644
index 0000000..2f211e3
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/java-json.jar differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/json/gsonGenerator.class b/JAVA/PROJET-PMT_STRI1A/bin/json/gsonGenerator.class
new file mode 100644
index 0000000..54e75b0
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/json/gsonGenerator.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/json/main.class b/JAVA/PROJET-PMT_STRI1A/bin/json/main.class
new file mode 100644
index 0000000..df4bbb7
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/json/main.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Arme.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Arme.class
new file mode 100644
index 0000000..9e2c5e4
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Arme.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Armure.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Armure.class
new file mode 100644
index 0000000..c1648b7
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Armure.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Bourse.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Bourse.class
new file mode 100644
index 0000000..7719b12
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Bourse.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Clavier.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Clavier.class
new file mode 100644
index 0000000..4b82024
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Clavier.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/EtreVivant.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/EtreVivant.class
new file mode 100644
index 0000000..d71e51c
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/EtreVivant.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Labyrinthe.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Labyrinthe.class
new file mode 100644
index 0000000..c259286
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Labyrinthe.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Marche.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Marche.class
new file mode 100644
index 0000000..d42abc1
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Marche.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Monstre.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Monstre.class
new file mode 100644
index 0000000..621421a
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Monstre.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Objet.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Objet.class
new file mode 100644
index 0000000..c83ed3d
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Objet.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Personnage.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Personnage.class
new file mode 100644
index 0000000..0c508d0
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Personnage.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Porte.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Porte.class
new file mode 100644
index 0000000..058eff2
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Porte.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Potion.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Potion.class
new file mode 100644
index 0000000..06ef54a
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Potion.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Salle.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Salle.class
new file mode 100644
index 0000000..da67af7
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Salle.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/Snippet.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Snippet.class
new file mode 100644
index 0000000..fe3f4db
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/Snippet.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/parseurJson.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/parseurJson.class
new file mode 100644
index 0000000..8b3b1ee
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/parseurJson.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/modeles/sauvegarde.class b/JAVA/PROJET-PMT_STRI1A/bin/modeles/sauvegarde.class
new file mode 100644
index 0000000..19bc1db
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/modeles/sauvegarde.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/module-info.class b/JAVA/PROJET-PMT_STRI1A/bin/module-info.class
new file mode 100644
index 0000000..1787b11
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/module-info.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/bin/test/Test.class b/JAVA/PROJET-PMT_STRI1A/bin/test/Test.class
new file mode 100644
index 0000000..503a921
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/bin/test/Test.class differ
diff --git a/JAVA/PROJET-PMT_STRI1A/src/java-json.jar b/JAVA/PROJET-PMT_STRI1A/src/java-json.jar
new file mode 100644
index 0000000..2f211e3
Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/src/java-json.jar differ
diff --git a/JAVA/PROJET-PMT_STRI1A/src/json/gsonGenerator.java b/JAVA/PROJET-PMT_STRI1A/src/json/gsonGenerator.java
new file mode 100644
index 0000000..3afdb48
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/src/json/gsonGenerator.java
@@ -0,0 +1,28 @@
+package json;
+import modeles.*;
+import com.google.gson.Gson;
+
+public class gsonGenerator {
+ String chaineJson;
+
+ /**
+ * @param chaineJson
+ */
+ public gsonGenerator() {
+
+
+ }
+ /*chaine json =
+ "{'positionX':0,
+ 'positionY':0,
+ 'sortie':false,
+ 'monstre':[{'nom':premier monstre,'pAttaque':5}],
+ 'porte':[{'ouvert':=true, 'position':"H"}]}"
+ */
+ public void generate(String chaine) {
+ Gson gson = new Gson();
+ Salle salle = gson.fromJson(chaine, Salle.class);
+ }
+
+
+}
diff --git a/JAVA/PROJET-PMT_STRI1A/src/json/main.java b/JAVA/PROJET-PMT_STRI1A/src/json/main.java
new file mode 100644
index 0000000..90d5283
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/src/json/main.java
@@ -0,0 +1,16 @@
+package json;
+
+
+import modeles.Monstre;
+
+public class main {
+
+ public static void main(String[] args) {
+ gsonGenerator generateur = new gsonGenerator();
+ Monstre monstr = new Monstre("test", 5);
+ String chaine = "{'positionX':0,'positionY':0,'sortie':false,'monstre':[{'nom':'premier monstre','pAttaque':5}],'porte':[{'ouvert':true, 'position':'H'}]}";
+ generateur.generate(chaine);
+
+ }
+
+}
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java
index 355a724..11334f1 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java
@@ -5,6 +5,8 @@ package modeles;
* @author flavien
*
*/
+
+
public class Arme extends Objet {
private int pArme;
@@ -22,5 +24,5 @@ public class Arme extends Objet {
this.pArme=attaque;
}
- /* public void effectArme ? (poison, incinération, gel, saignement, paralysie,... */
+ /* public void effectArme ? (poison, incin�ration, gel, saignement, paralysie,... */
}
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java
index 085d602..c22feee 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java
@@ -14,7 +14,7 @@ public class EtreVivant {
protected int pVieMax;
protected int pVie;
private int pAttaque;
- protected Salle salle;
+ //protected Salle salle;
private boolean vivant;
/**
* @param nom
@@ -24,13 +24,13 @@ public class EtreVivant {
* @param salle
* @param vivant
*/
- public EtreVivant(String nom, int pVieMax, int pAttaque, Salle salle) {
+ public EtreVivant(String nom, int pVieMax, int pAttaque) {
super();
this.nom = nom;
this.pVieMax = pVieMax;
this.pVie = pVieMax;
this.pAttaque = pAttaque;
- this.salle = salle;
+
this.vivant = true;
}
/**
@@ -80,16 +80,15 @@ public class EtreVivant {
}
/**
* @return the salle
- */
+
public Salle getSalle() {
return salle;
}
- /**
- * @param salle the salle to set
- */
+
public void setSalle(Salle salle) {
this.salle = salle;
}
+ */
/**
* @return the vivant
*/
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java
index 256ba45..e8e4124 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java
@@ -3,10 +3,17 @@
*/
package modeles;
+import java.util.List;
+
/**
* @author flavien
*
*/
public class Marche extends Salle {
+ public Marche(int positionX, int positionY, boolean sortie, List listeEnnemie, List listePorte) {
+ super(positionX, positionY, sortie, listeEnnemie, listePorte);
+ // TODO Auto-generated constructor stub
+ }
+
}
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java
index 9ccda2a..65b865c 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java
@@ -14,8 +14,8 @@ public class Monstre extends EtreVivant {
* @param armure
* @param bourse
*/
- public Monstre(String nom, int pAttaque, Salle salle) {
- super(nom, 5, pAttaque, salle);
+ public Monstre(String nom, int pAttaque) {
+ super(nom, 5, pAttaque);
}
public int attaquer(Personnage def) {
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java
index a36ad96..b9f4c77 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java
@@ -8,8 +8,8 @@ public class Personnage extends EtreVivant {
private Arme arme;
private Armure armure;
private Bourse bourse;
- public Personnage(String nom, int pVieMax,int pAttaque, Salle salle) {
- super(nom, pVieMax, pAttaque, salle);
+ public Personnage(String nom, int pVieMax,int pAttaque) {
+ super(nom, pVieMax, pAttaque);
}
public void equiper(Arme arme) {
@@ -27,9 +27,11 @@ public void equiper(Armure armure) {
System.out.println("Pv au maximum");
potion.utilisation();
}
+ /*
public void seDeplacer(Salle salle) {
this.salle=salle;
}
+ */
public int attaquer(Monstre monstre) {
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java
index 80d4645..9b57cde 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java
@@ -19,7 +19,7 @@ public class Salle {
* @param listeEnnemie
* @param listePorte
*/
- public Salle(int positionX, int positionY, boolean sortie, List listeEnnemie, List listePorte) {
+ public Salle(int positionX, int positionY, boolean sortie, List listeEnnemie, List listePorte) {
this.positionX = positionX;
this.positionY = positionY;
this.sortie = sortie;
diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java
index 4e3b248..8e5a8b5 100644
--- a/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java
+++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java
@@ -17,9 +17,9 @@ public class sauvegarde {
+ "\n\t \"pVieMax\" : \""+lab.listePersonnage.get(i).getPvMax()
+"\" ,\n\t \"pVie\" : \""+lab.listePersonnage.get(i).getpVie()
+"\" ,\n\t \"pAttaque\" : \""+lab.listePersonnage.get(i).getpAttaque()
- +"\" ,\n\t \"salle\" : \""+lab.listePersonnage.get(i).getSalle().getPositionX()+" "+lab.listePersonnage.get(i).getSalle().getPositionY() /*attention pour la récupération de sauvegarde*/
+ //+"\" ,\n\t \"salle\" : \""+lab.listePersonnage.get(i).getSalle().getPositionX()+" "+lab.listePersonnage.get(i).getSalle().getPositionY() /*attention pour la r�cup�ration de sauvegarde*/
+"\" ,\n\t \"vivant\" : \""+lab.listePersonnage.get(i).isVivant() +"\n\t \"arme\" : \""+lab.listePersonnage.get(i).getArme().getNom()
- +"\" ,\n\t \"armure\" : \""+lab.listePersonnage.get(i).getArmure().getNom() +"\n\t \"bourse\" : \""+lab.listePersonnage.get(i).getBourse().getValeur()+"\n}"); /* attention pour la récupération de donnée */
+ +"\" ,\n\t \"armure\" : \""+lab.listePersonnage.get(i).getArmure().getNom() +"\n\t \"bourse\" : \""+lab.listePersonnage.get(i).getBourse().getValeur()+"\n}"); /* attention pour la r�cup�ration de donn�e */
}
fw.flush();
fw.close();
@@ -28,7 +28,7 @@ public class sauvegarde {
}
}
/*
- public void enregistrerLabyrinthe(Labyrinthe lab) { // à faire
+ public void enregistrerLabyrinthe(Labyrinthe lab) { // � faire
try {
File f = new File ("./labyrinthe.json");
f.createNewFile();
diff --git a/JAVA/PROJET-PMT_STRI1A/src/module-info.java b/JAVA/PROJET-PMT_STRI1A/src/module-info.java
new file mode 100644
index 0000000..cf59b57
--- /dev/null
+++ b/JAVA/PROJET-PMT_STRI1A/src/module-info.java
@@ -0,0 +1,11 @@
+/**
+ *
+ */
+/**
+ * @author nicolas
+ *
+ */
+module projet {
+ requires gson;
+
+}
\ No newline at end of file