This commit is contained in:
Gaspard VANCOMPERNOLLE 2025-04-09 09:44:54 +02:00
parent 4206f7e5f9
commit d802462ea0
2 changed files with 16 additions and 4 deletions

View File

@ -6,6 +6,7 @@ public class Board {
private int width;
private int height;
private ArrayList<Piece> pieces = new ArrayList<>();
public Board(int colNum, int lineNum) {
this.width = colNum;

View File

@ -1,21 +1,32 @@
package backend;
public class Piece {
private int x;
private int y;
private PieceType type;
private boolean isWhite;
public Piece(PieceType type, boolean isWhite, int x, int y) {
this.type = type;
this.isWhite = isWhite;
this.x = x;
this.y = y;
}
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;
}
}