From a51eab8df24c2a210c2d0656c788199f9345d3ad Mon Sep 17 00:00:00 2001 From: vaisse Date: Thu, 16 Oct 2025 11:37:40 +0200 Subject: [PATCH] classe tuile + classe hexply. Pour Riad --- HexPly.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 HexPly.java diff --git a/HexPly.java b/HexPly.java new file mode 100644 index 0000000..a196378 --- /dev/null +++ b/HexPly.java @@ -0,0 +1,25 @@ + +public class HexPly extends AbstractPly{ + //attributs + private byte y; + private byte r; + private String color; + + //méthodes + public Tuile attemptPlaceTuile(){ + Tuile t = new Tuile(this.y, this.r, this.color); + return t; + } + + //constructeur + public HexPly(byte y, byte r, Player p){ + this.y = y; + this.r = r; + this.joueur = p; + if(p == Player.PLAYER1){ + this.color = "blue"; + } else { + this.color = "red"; + } + } +} \ No newline at end of file