bishopAttacks function

int bishopAttacks(
  1. int sq,
  2. int occ
)

Bishop attacks from sq given full-board occupancy.

Implementation

int bishopAttacks(int sq, int occ) =>
    _rayAttack(_dirNE, sq, occ) |
    _rayAttack(_dirNW, sq, occ) |
    _rayAttack(_dirSE, sq, occ) |
    _rayAttack(_dirSW, sq, occ);