isAttacked(sq, color) {
    return (
      this.isAttackedByPawn(sq, color) ||
      this.isAttackedByRook(sq, color) ||
      this.isAttackedByKnight(sq, color) ||
      this.isAttackedByBishop(sq, color) ||
      this.isAttackedByQueen(sq, color) ||
      this.isAttackedByKing(sq, color)
    );
  }
// Check if pieces of given color are attacking (king) on square x,y
Check if pieces of given color are attacking (king) on square x,y
Check if pieces of given color are attacking ( king ) on square x y
isAttacked(sq, color) {
    return (
      this.isAttackedByPawn(sq, color) ||
      this.isAttackedByRook(sq, color) ||
      this.isAttackedByKnight(sq, color) ||
      this.isAttackedByBishop(sq, color) ||
      this.isAttackedByQueen(sq, color) ||
      this.isAttackedByKing(sq, color)
    );
  }
isAttacked ( sq , color ) { return ( this . isAttackedByPawn ( sq , color ) || this . isAttackedByRook ( sq , color ) || this . isAttackedByKnight ( sq , color ) || this . isAttackedByBishop ( sq , color ) || this . isAttackedByQueen ( sq , color ) || this . isAttackedByKing ( sq , color ) ) ; }
Check if pieces of given color are attacking (king) on square x,y
Check if pieces of given color are attacking ( king ) on square x y