- (this.board[i1][j1] != V.EMPTY &&
- colors.includes(this.getColor(i1, j1)) &&
- this.board[i2][j2] == V.EMPTY) ||
- (this.board[i2][j2] != V.EMPTY &&
- colors.includes(this.getColor(i2, j2)) &&
- this.board[i1][j1] == V.EMPTY)
+ (
+ this.board[i1][j1] != V.EMPTY &&
+ this.getColor(i1, j1) == color &&
+ this.board[i2][j2] == V.EMPTY
+ )
+ ||
+ (
+ this.board[i2][j2] != V.EMPTY &&
+ this.getColor(i2, j2) == color &&
+ this.board[i1][j1] == V.EMPTY
+ )