37 lines
551 B
Java
37 lines
551 B
Java
|
|
import java.util.List;
|
||
|
|
|
||
|
|
public class Tuile {
|
||
|
|
/*ATTRIBUTS*/
|
||
|
|
private byte y;
|
||
|
|
private byte r;
|
||
|
|
private String color;
|
||
|
|
private List<Tuile> voisins = new List<Tuile>();
|
||
|
|
|
||
|
|
/*METHODES*/
|
||
|
|
public byte getY(){
|
||
|
|
return this.y;
|
||
|
|
}
|
||
|
|
|
||
|
|
public byte getR(){
|
||
|
|
return this.r;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getColor(){
|
||
|
|
return this.color;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void addVoisin(Tuile v){
|
||
|
|
this.voisins.add(v);
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<Tuile> getVoisins(){
|
||
|
|
return this.voisins;
|
||
|
|
}
|
||
|
|
|
||
|
|
/*CONSTRUCTEUR*/
|
||
|
|
public Tuile(byte y, byte r, String c){
|
||
|
|
this.y = y;
|
||
|
|
this.r = r;
|
||
|
|
this.color = c;
|
||
|
|
}
|
||
|
|
}
|