package modeles; import java.util.ArrayList; import java.util.List; import javafx.util.Pair; public class Salle { private Pair coordonnees; private boolean sortie; private List listePorte= new ArrayList(); private List listeEnnemie= new ArrayList(); //indice de monstre public Salle(int x, int y, boolean out) { this.coordonnees=new Pair(x,y); this.sortie=out; } public List getListeEnnemie() { return listeEnnemie; } public Salle(int positionX, int positionY, boolean sortie, List listeEnnemie) { this.coordonnees=new Pair(positionX,positionY); this.sortie = sortie; this.listeEnnemie = listeEnnemie; } public String getType(){ return "salle"; } public Pair getCoordonnes() { return this.coordonnees; } public boolean estSortie() { return sortie; } public void cle(Labyrinthe lab) { if (listeEnnemie.isEmpty()) { for (int i : listePorte ) lab.listePorte.get(i).ouverture(); } } public boolean estVide() { return listeEnnemie.isEmpty(); } public List getListePorte() { return this.listePorte; } }