autoplayer with the public method in board
This commit is contained in:
parent
8b5183f09d
commit
f75359ffb6
|
|
@ -15,8 +15,6 @@ public class Board {
|
||||||
private ArrayList<Move> moveHistory = new ArrayList<>();
|
private ArrayList<Move> moveHistory = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*public Board(int colNum, int lineNum) {
|
/*public Board(int colNum, int lineNum) {
|
||||||
this.width = colNum;
|
this.width = colNum;
|
||||||
this.height = lineNum;
|
this.height = lineNum;
|
||||||
|
|
@ -411,7 +409,7 @@ private boolean isEnemy(int x, int y, boolean isWhite) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ArrayList<int[]> computeLegalMoves(Piece piece) {
|
public ArrayList<int[]> computeLegalMoves(Piece piece) {
|
||||||
ArrayList<int[]> moves = new ArrayList<>();
|
ArrayList<int[]> moves = new ArrayList<>();
|
||||||
int x = piece.getX();
|
int x = piece.getX();
|
||||||
int y = piece.getY();
|
int y = piece.getY();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue