You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.2 KiB
Java
67 lines
1.2 KiB
Java
|
|
package modeles;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author flavien
|
|
*
|
|
*/
|
|
public class Salle {
|
|
public static int positionX;
|
|
/**
|
|
* @param positionX
|
|
* @param positionY
|
|
* @param sortie
|
|
* @param listeEnnemie
|
|
* @param listePorte
|
|
*/
|
|
|
|
public Salle(int positionX, int positionY, boolean sortie, List<Integer> listeEnnemie) {
|
|
this.positionX=positionX;
|
|
this.positionY = positionY;
|
|
this.sortie = sortie;
|
|
this.listeEnnemie = listeEnnemie;
|
|
}
|
|
|
|
public Salle(int positionX, int positionY, boolean sortie, List<Integer> listeEnnemie, Porte sal) {
|
|
this.positionX = positionX;
|
|
this.positionY = positionY;
|
|
this.sortie = sortie;
|
|
this.listeEnnemie = listeEnnemie;
|
|
this.listePorte.add(sal.getId());
|
|
}
|
|
|
|
public Salle() {
|
|
|
|
}
|
|
|
|
private static int positionY;
|
|
private static boolean sortie;
|
|
private static List<Integer> listeEnnemie= new ArrayList<Integer>();
|
|
private static List<Integer> listePorte = new ArrayList<Integer>();
|
|
|
|
public String getType(){
|
|
return "salle";
|
|
}
|
|
|
|
public int getPositionX() {
|
|
return positionX;
|
|
}
|
|
|
|
public int getPositionY() {
|
|
return positionY;
|
|
}
|
|
|
|
public boolean estSortie() {
|
|
return sortie;
|
|
}
|
|
|
|
public boolean estVide() {
|
|
return listeEnnemie.isEmpty();
|
|
}
|
|
|
|
}
|
|
|