findCaptures(sq) {
    let moves = [];
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.PAWN));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.ROOK));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.KNIGHT));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.BISHOP));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.QUEEN));
    return moves;
  }
// Find possible captures from a square: look in every direction!
Find possible captures from a square: look in every direction!
Find possible captures from a square : look in every direction!
findCaptures(sq) {
    let moves = [];
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.PAWN));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.ROOK));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.KNIGHT));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.BISHOP));
    Array.prototype.push.apply(moves, this.findCaptures_aux(sq, V.QUEEN));
    return moves;
  }
findCaptures ( sq ) { let moves = [ ] ; Array . prototype . push . apply ( moves , this . findCaptures_aux ( sq , V . PAWN ) ) ; Array . prototype . push . apply ( moves , this . findCaptures_aux ( sq , V . ROOK ) ) ; Array . prototype . push . apply ( moves , this . findCaptures_aux ( sq , V . KNIGHT ) ) ; Array . prototype . push . apply ( moves , this . findCaptures_aux ( sq , V . BISHOP ) ) ; Array . prototype . push . apply ( moves , this . findCaptures_aux ( sq , V . QUEEN ) ) ; return moves ; }
Find possible captures from a square: look in every direction!
Find possible captures from a square : look in every direction!