This commit is contained in:
charles.duteil 2025-04-09 10:16:22 +02:00
parent 2b45b74ec7
commit 732190e8a7
2 changed files with 23 additions and 8 deletions

View File

@ -9,7 +9,11 @@ public class Board {
private int Width;
private int Height;
private ArrayList <Piece> pieces;
private ArrayList <Piece> pieces;
private int x;
private int y;
private PieceType type;
private boolean isWhite;
@ -32,7 +36,7 @@ private ArrayList <Piece> pieces;
}
public int getTurnNumber() {
//TODO
return 0;
}
@ -42,11 +46,15 @@ private ArrayList <Piece> pieces;
}
public void setPiece(boolean isWhite, PieceType type, int x, int y) {
//TODO
this.x = x;
this.y = y;
this.type = type;
this.isWhite = isWhite;
}
public void populateBoard() {
//TODO
}
public void cleanBoard() {

View File

@ -1,21 +1,28 @@
package backend;
public class Piece {
private int x;
private int y;
private PieceType type;
private boolean 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;
}
}