implemented isLegalForBishop and isLegalForKing