piecetype done

This commit is contained in:
hugomanipoud2 2025-05-09 09:37:20 +02:00
parent 242691796e
commit e1c893cada
1 changed files with 5 additions and 6 deletions

View File

@ -4,10 +4,12 @@ public class Piece {
private int x;
private int y;
private PieceType type;
public Piece(int xCoord, int yCoord) {
public Piece(int xCoord, int yCoord, PieceType typeConstructor) {
this.x = xCoord;
this.y = yCoord;
this.type = typeConstructor;
}
public int getX() {
return x;
@ -17,11 +19,8 @@ public class Piece {
return y;
}
public PieceType getType(Piece selectedPiece) {
int x = selectedPiece.getX() ;
int y = selectedPiece.getY() ;
Piecetype selectedPiece = ;
return null;
public PieceType getType() {
return type;
}
public boolean isWhite() {