Merge branch 'master' of

https://gitarero.ecam.fr/keshini.nistar/OOP_Groupe_1A3_Project.git
This commit is contained in:
keshi 2025-05-06 15:58:46 +02:00
commit 5cc24e4348
1 changed files with 16 additions and 5 deletions

View File

@ -34,7 +34,9 @@ public class Board {
}
public void setPiece(boolean isWhite, PieceType type, int x, int y) {
board[x][y]=new Piece(x, y, type, isWhite );
board[y][x]= new Piece (x, y, type, isWhite);
}
public void populateBoard() {
@ -56,14 +58,23 @@ public class Board {
public void cleanBoard() {
for(int y=0; y<8;y++) {
for(int y=0; y<8; y++) {
for(int x=0; x<8; x++) {
board[x][y]=null;
board[x][y]= null;
}
}
}
}
public String toString() { //method should be upgraded as we go to represent the full board's data as we go
public String toString() {
for (int y=0; y< height; y++) {
for (int x=0; x<width; x++) {
}
}
return "";
}