normally rhe code should work to see display modify this : public
ArrayList<Piece> getPieces() {
ArrayList<Piece> pieces = new ArrayList<>();
//TODO
return pieces;
}
This commit is contained in:
parent
385f457154
commit
3fe51e6652
|
|
@ -16,12 +16,12 @@ public class Board {
|
|||
}
|
||||
|
||||
public int getWidth() {
|
||||
width = 8; // setting the width at 8 for the moment can be changed
|
||||
//width = 8; // setting the width at 8 for the moment can be changed
|
||||
return width;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
height = 8; // setting the height at 8 for the moment can be changed
|
||||
//height = 8; // setting the height at 8 for the moment can be changed
|
||||
return height;
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +43,8 @@ public class Board {
|
|||
}
|
||||
|
||||
public void populateBoard() {
|
||||
|
||||
board[0][0] = new Piece(false, PieceType.Rook, 0, 0);
|
||||
/*
|
||||
// Place Rooks
|
||||
board[0][0] = new Rook(PieceColor.BLACK, new Position(0, 0));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,13 @@ public class Piece {
|
|||
int y;
|
||||
private PieceType type;
|
||||
|
||||
public Piece(boolean whitePiece, PieceType type, int x, int y) {
|
||||
this.whitePiece = whitePiece;
|
||||
this.type = type;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue