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