placement of new pieces
This commit is contained in:
parent
2b5e128809
commit
c96ddc3cd7
|
|
@ -38,8 +38,16 @@ public class Board {
|
|||
}
|
||||
|
||||
public void setPiece(boolean isWhite, PieceType type, int x, int y) {
|
||||
//TODO
|
||||
// Ensure coordinates are inside the board boundaries
|
||||
// if (x < 0 || x >= width || y < 0 || y >= height) {
|
||||
// System.out.println("Invalid coordinates: (" + x + ", " + y + ")");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Create and place the new piece
|
||||
board[x][y] = new Piece(isWhite, type, x, y);
|
||||
}
|
||||
|
||||
|
||||
public void populateBoard() {
|
||||
// Place Rooks
|
||||
|
|
|
|||
Loading…
Reference in New Issue