- if (this.board[i][j] != V.EMPTY && this.getColor(i, j) != oppCol) {
- const moves = this.getPotentialMovesFrom([i, j]);
- if (moves.length > 0)
- return true;
+ if (this.board[i][j] != V.EMPTY && this.getColor(i, j) == color) {
+ if (this.getPotentialMovesFrom([i, j]).length > 0) return true;