implement Piece constructor and getter

This commit is contained in:
Tikea TE 2025-05-22 18:47:50 +02:00
parent 74747eeeb5
commit af610e408e
1 changed files with 17 additions and 4 deletions

View File

@ -2,20 +2,33 @@ package backend;
public class Piece {
private int x;
private int y;
private PieceType type;
private boolean isWhite;
public Piece(int x, int y, PieceType type,boolean isWhite) {
this.x = x;
this.y = y;
this.type = type;
this.isWhite = isWhite;
}
public int getX() {
return 0;
return x;
}
public int getY() {
return 0;
return y;
}
public PieceType getType() {
return null;
return type;
}
public boolean isWhite() {
return false;
return isWhite;
}
}