diff --git a/src/backend/Board.java b/src/backend/Board.java index 467fa72..8977016 100644 --- a/src/backend/Board.java +++ b/src/backend/Board.java @@ -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