petite modification de certaines classes

nicolas
Theo_Dubo 5 years ago
parent 7b3f48f0fa
commit dac5861088

@ -26,7 +26,6 @@ public class EtreVivant {
this.pVieMax = pVieMax;
this.pVie = pVieMax;
this.pAttaque = pAttaque;
this.salle = salle;
this.vivant = true;
}
/**

@ -17,7 +17,9 @@ public class Porte {
super();
this.ouvert = ouvert;
this.salle1 = salle;
this.salle1.getListePorte().add(this.id);
this.salle2 = salle2;
this.salle2.getListePorte().add(this.id);
this.id++;
}
public boolean estOuverte() {

@ -4,14 +4,10 @@ import java.util.ArrayList;
import java.util.List;
import javafx.util.Pair;
/**
* @author flavien
*
*/
public class Salle {
private Pair<Integer,Integer> coordonnees;
private boolean sortie;
private List<Porte> listePorte= new ArrayList<Porte>();
private List<Integer> listePorte= new ArrayList<Integer>();
private List<Integer> listeEnnemie= new ArrayList<Integer>(); //indice de monstre
public Salle(int x, int y, boolean out) {
@ -38,15 +34,17 @@ public class Salle {
return sortie;
}
public void cle() {
public void cle(Labyrinthe lab) {
if (listeEnnemie.isEmpty()) {
for (Porte p : listePorte) {
p.ouverture();
}
for (int i : listePorte ) lab.listePorte.get(i).ouverture();
}
}
public boolean estVide() {
return listeEnnemie.isEmpty();
}
public List<Integer> getListePorte() {
return this.listePorte;
}
}

Loading…
Cancel
Save