comment board
This commit is contained in:
parent
dc8c3d1faa
commit
b7c1e9b497
|
|
@ -7,8 +7,8 @@ public class Board {
|
||||||
private int selectedX = -1; // negative value means impossible x and y so unselected
|
private int selectedX = -1; // negative value means impossible x and y so unselected
|
||||||
private int selectedY = -1;
|
private int selectedY = -1;
|
||||||
|
|
||||||
private int turnNumber = 0; // track current turn
|
private int turnNumber = 0; // tracks current turn
|
||||||
private int width;
|
private int width; // enables to define the dimensions of board
|
||||||
private int height;
|
private int height;
|
||||||
private Piece[][] board; // 2D array chess board
|
private Piece[][] board; // 2D array chess board
|
||||||
private ArrayList<int[]> highlightedPositions = new ArrayList<>(); // list of valid positions to highlight
|
private ArrayList<int[]> highlightedPositions = new ArrayList<>(); // list of valid positions to highlight
|
||||||
|
|
@ -16,7 +16,7 @@ public class Board {
|
||||||
public Board(int colNum, int lineNum) {
|
public Board(int colNum, int lineNum) {
|
||||||
this.width = colNum;
|
this.width = colNum;
|
||||||
this.height = lineNum;
|
this.height = lineNum;
|
||||||
this.board = new Piece[width][height]; // first empty board
|
this.board = new Piece[width][height]; // first empty board *********REVIEW************
|
||||||
clearConsole();
|
clearConsole();
|
||||||
System.out.println(toString()); // print the chess at the beginning of the game
|
System.out.println(toString()); // print the chess at the beginning of the game
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue