piece class with tentative de boolean

This commit is contained in:
l.mccann-marteau 2025-04-09 10:24:15 +02:00
parent 8095067fe9
commit bf4edae24e
1 changed files with 6 additions and 2 deletions

View File

@ -3,11 +3,15 @@ package backend;
public class Piece {
private int x;
private int y;
private String color;
private PieceType type;
public Piece(int x, int y) {
public Piece(int x, int y, String color, PieceType type) {
this.x=x;
this.y=y;
this.color=color;
this.type=type;
}
public int getX() {
@ -19,7 +23,7 @@ public class Piece {
}
public PieceType getType() {
return null;
return type;
}
public boolean isWhite() {