diff --git a/JAVA/PROJET-PMT_STRI1A/.classpath b/JAVA/PROJET-PMT_STRI1A/.classpath index a6fa10e..2c2acd4 100644 --- a/JAVA/PROJET-PMT_STRI1A/.classpath +++ b/JAVA/PROJET-PMT_STRI1A/.classpath @@ -1,12 +1,12 @@ - + - + diff --git a/JAVA/PROJET-PMT_STRI1A/src/.DS_Store b/JAVA/PROJET-PMT_STRI1A/src/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/src/.DS_Store differ diff --git a/JAVA/PROJET-PMT_STRI1A/src/gson-2.8.5.jar b/JAVA/PROJET-PMT_STRI1A/src/gson-2.8.5.jar new file mode 100644 index 0000000..0d5baf3 Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/src/gson-2.8.5.jar differ diff --git a/JAVA/PROJET-PMT_STRI1A/src/jdbc-support-1.0.23-sources.jar b/JAVA/PROJET-PMT_STRI1A/src/jdbc-support-1.0.23-sources.jar new file mode 100755 index 0000000..a2c3ca3 Binary files /dev/null and b/JAVA/PROJET-PMT_STRI1A/src/jdbc-support-1.0.23-sources.jar differ diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java index 87ca8aa..1c08aea 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java @@ -17,12 +17,11 @@ public class Armure extends Objet { return "Armure"; } - public Armure(String nm, int valeur, int resistance,int efficacité) { + public Armure(String nm, int valeur, int resistance,int efficacit�) { super(nm, valeur, resistance); - this.pArmure=efficacité; + this.pArmure=efficacit�; } - /* public armureEffect(...) */ } diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java index 7e0b64e..60d7e50 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java @@ -1,6 +1,3 @@ -/** - * - */ package modeles; import java.util.ArrayList; @@ -10,13 +7,35 @@ import java.util.List; * @author flavien * */ + public class Marche extends Salle { private List listeObjet=new ArrayList(); public Marche(List listeEnnemie) { super(0,0, false, listeEnnemie); - // TODO Auto-generated constructor stub } - //methode pour enregistrer la liste objet (il faudra sans doute changer le type de listeObjet) settingListeObjet(Labyrinthe lab) + public String creerObjetsAVendre(Labyrinthe lab) { + String listeSarme=""; + String listeSarmure=""; + String listeobjet=""; + int i = 0; + int j = 0; + + for (Arme arme : lab.listeArme) { + //stringifier les armes + listeSarme += arme.toString() + " au prix de : " + arme.getPrix()"\n"; + i++; + } + + for (Armure armure : lab.listeArmure) { + //stringifier les armures + listeSarmure += armure.toString()+ " au prix de : " + armure.getPrix()"\n"; + j++; + } + + listeobjet = "Armes :\n" + listeSarme + "Armes :\n" + listeSarmure; + + return listeobjet; + } } diff --git a/JAVA/PROJET-PMT_STRI1A/src/test/Test.java b/JAVA/PROJET-PMT_STRI1A/src/test/Test.java index 2e753d2..8c9eb63 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/test/Test.java +++ b/JAVA/PROJET-PMT_STRI1A/src/test/Test.java @@ -5,5 +5,23 @@ package test; * */ public class Test { + + public void main() { + + Menu menu = new Menu; + + + + + + + + + + + + + + } }