- for (let step of V.steps[V.BISHOP].concat([[shift, 0]])) {
- const [i, j] = [x + step[0], y + step[1]];
- if (
- V.OnBoard(i, j) &&
- this.board[i][j] != V.EMPTY &&
- this.getColor(i, j) == color &&
- this.getPiece(i, j) == V.SILVER_G
- ) {
- return true;
- }
- }
- return false;
+ return this.isAttackedBySlideNJump(
+ sq, color, V.SILVER, V.steps[V.BISHOP].concat([ [shift, 0] ]), 1);