correction de la sauvegarde et de la référence aux portes, ajout de méthode toString
parent
71004f4902
commit
e119bf5920
@ -1 +0,0 @@
|
||||
{"listePersonnage":[{"listepotion":[],"nom":"Aramis","pVieMax":10,"pVie":10,"pAttaque":1,"vivant":true},{"listepotion":[],"nom":"Boromis","pVieMax":8,"pVie":8,"pAttaque":2,"vivant":true}],"listeArme":[{"pArme":2,"nom":"Epee en bois","prix":5,"usure":10},{"pArme":4,"nom":"Epee en acier","prix":15,"usure":10},{"pArme":4,"nom":"Epee en acier solide","prix":25,"usure":20},{"pArme":7,"nom":"Epee de cristal","prix":30,"usure":5},{"pArme":10,"nom":"Lame Blanche","prix":200,"usure":30}],"listeArmure":[{"pArmure":5,"nom":"armure de cuir","prix":10,"usure":10},{"pArmure":2,"nom":"armure en papier","prix":5,"usure":5},{"pArmure":5,"nom":"armure de fer","prix":30,"usure":10},{"pArmure":8,"nom":"Le kevlar","prix":150,"usure":15}],"listePorte":[{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":0,"value":0},"sortie":false,"listePorte":[]},"salle2":{"coordonnees":{"key":1,"value":0},"sortie":false,"listePorte":[],"listeEnnemie":[5]}},{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":0,"value":0},"sortie":false,"listePorte":[]},"salle2":{"coordonnees":{"key":0,"value":1},"sortie":false,"listePorte":[],"listeEnnemie":[3,1]}},{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":1,"value":1},"sortie":false,"listePorte":[],"listeEnnemie":[]},"salle2":{"coordonnees":{"key":0,"value":1},"sortie":false,"listePorte":[],"listeEnnemie":[3,1]}},{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":2,"value":0},"sortie":false,"listePorte":[],"listeEnnemie":[4,0]},"salle2":{"coordonnees":{"key":1,"value":0},"sortie":false,"listePorte":[],"listeEnnemie":[5]}},{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":2,"value":0},"sortie":false,"listePorte":[],"listeEnnemie":[4,0]},"salle2":{"coordonnees":{"key":2,"value":1},"sortie":true,"listePorte":[],"listeEnnemie":[3,3]}},{"id":1,"ouvert":true,"salle1":{"coordonnees":{"key":2,"value":1},"sortie":true,"listePorte":[],"listeEnnemie":[3,3]},"salle2":{"coordonnees":{"key":1,"value":1},"sortie":false,"listePorte":[],"listeEnnemie":[]}}],"listeMonstre":[{"nom":"pantin en bois","pVieMax":5,"pVie":5,"pAttaque":1,"vivant":true},{"nom":"araignee geante agressive","pVieMax":7,"pVie":7,"pAttaque":5,"vivant":true},{"nom":"pantin de fer","pVieMax":40,"pVie":40,"pAttaque":1,"vivant":true},{"nom":"Golem de Jade","pVieMax":40,"pVie":40,"pAttaque":3,"vivant":true},{"nom":"Neltharion le Gardeterre","pVieMax":100,"pVie":100,"pAttaque":10,"vivant":true},{"nom":"Neltharion, le Destructeur","pVieMax":80,"pVie":80,"pAttaque":20,"vivant":true}]}
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package labyrinthe;
|
||||
import modeles.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public class Marche extends Salle {
|
||||
|
||||
public Marche() {
|
||||
super(0,0, false);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return "Marche";
|
||||
}
|
||||
|
||||
public static String creerObjetsAVendre(Labyrinthe lab) {
|
||||
String listeSarme="";
|
||||
String listeSarmure="";
|
||||
String listeobjet="";
|
||||
int i = 0;
|
||||
int j =0;
|
||||
|
||||
for (Arme arme : lab.listeArme) listeSarme +=i++ +") "+ arme.getNom() + " au prix de : " + arme.getPrix()+"\n";
|
||||
|
||||
for (Armure armure : lab.listeArmure) listeSarmure +=j++ +") "+ armure.getNom()+ " au prix de : " + armure.getPrix()+"\n";
|
||||
|
||||
listeobjet = "Armes :\n" + listeSarme + "\nArmures :\n" + listeSarmure;
|
||||
|
||||
return listeobjet;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue