2025-10-16 11:35:37 +02:00
|
|
|
import java.util.LinkedList;
|
2025-10-16 11:30:05 +02:00
|
|
|
|
|
|
|
|
public class Tuile {
|
|
|
|
|
/*ATTRIBUTS*/
|
|
|
|
|
private byte y;
|
|
|
|
|
private byte r;
|
|
|
|
|
private String color;
|
2025-10-16 11:35:37 +02:00
|
|
|
private LinkedList<Tuile> voisins = new LinkedList<Tuile>();
|
2025-10-16 11:30:05 +02:00
|
|
|
|
|
|
|
|
/*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);
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-16 11:35:37 +02:00
|
|
|
public LinkedList<Tuile> getVoisins(){
|
2025-10-16 11:30:05 +02:00
|
|
|
return this.voisins;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*CONSTRUCTEUR*/
|
|
|
|
|
public Tuile(byte y, byte r, String c){
|
|
|
|
|
this.y = y;
|
|
|
|
|
this.r = r;
|
|
|
|
|
this.color = c;
|
|
|
|
|
}
|
|
|
|
|
}
|