implemented the isLegalMove for the Bishop class