classe tuile + classe hexply. Pour Riad

This commit is contained in:
vaisse
2025-10-16 11:37:40 +02:00
parent 1d2f169417
commit a51eab8df2

25
HexPly.java Normal file
View File

@@ -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";
}
}
}