implemented isLegalMove for the Kind class