- else if (
- this.onBoard(afterSquare[0], afterSquare[1]) &&
- this.board[nextSquare[0]][nextSquare[1]] != "" &&
- this.getColor(nextSquare[0], nextSquare[1]) != 'a' &&
- this.getColor(afterSquare[0], afterSquare[1]) != this.turn
- ) {
- nextMove = this.getBasicMove([move.end.x, move.end.y], afterSquare);
- }
- this.undoOnBoard(move);