diff --git a/Tuile.java b/Tuile.java new file mode 100644 index 0000000..9ef3eb8 --- /dev/null +++ b/Tuile.java @@ -0,0 +1,37 @@ +import java.util.List; + +public class Tuile { + /*ATTRIBUTS*/ + private byte y; + private byte r; + private String color; + private List voisins = new List(); + + /*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 getVoisins(){ + return this.voisins; + } + + /*CONSTRUCTEUR*/ + public Tuile(byte y, byte r, String c){ + this.y = y; + this.r = r; + this.color = c; + } +} \ No newline at end of file