25 lines
427 B
Java
25 lines
427 B
Java
|
|
|
||
|
|
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";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|