added lsicreerObjetsAVendre

This commit is contained in:
Flavien Haas 2019-05-17 15:32:33 +02:00
parent dac5861088
commit 28a9a15549
7 changed files with 46 additions and 10 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="/home/nicolas/Bureau/jdbc-support-1.0.23-sources.jar">
<classpathentry kind="lib" path="/Users/flavien/Seafile/UPSSITECH/programmation/java/Projet_Java/JAVA/PROJET-PMT_STRI1A/src/jdbc-support-1.0.23-sources.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="/home/nicolas/Téléchargements/gson-2.8.5.jar">
<classpathentry kind="lib" path="/Users/flavien/Seafile/UPSSITECH/programmation/java/Projet_Java/JAVA/PROJET-PMT_STRI1A/src/gson-2.8.5.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>

BIN
JAVA/PROJET-PMT_STRI1A/src/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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<EFBFBD>) {
super(nm, valeur, resistance);
this.pArmure=efficacité;
this.pArmure=efficacit<EFBFBD>;
}
/* public armureEffect(...) */
}

View File

@ -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<Integer> listeObjet=new ArrayList<Integer>();
public Marche(List<Integer> 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;
}
}

View File

@ -5,5 +5,23 @@ package test;
*
*/
public class Test {
public void main() {
Menu menu = new Menu;
}
}