From 56727aea9f7fa2836443aea3262347806dd14467 Mon Sep 17 00:00:00 2001 From: vaisse Date: Thu, 16 Oct 2025 11:30:05 +0200 Subject: [PATCH] =?UTF-8?q?Une=20classe=20tuile,=20s=C3=BBrement=20utile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tuile.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Tuile.java 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