------------------------------------------------------------------------------
-- | Move legality checker constructor
mkLegality :: Board -> Legality
mkLegality b =
  let checkers = attackedFromBB b (occupancy b) (b^.B.opponent) (myKingPos b)
  in Legality b (checkers /= mempty) (pinned b) S.empty
mkLegality :: Board -> Legality
mkLegality b =
  let checkers = attackedFromBB b (occupancy b) (b^.B.opponent) (myKingPos b)
  in Legality b (checkers /= mempty) (pinned b) S.empty
mkLegality b =
  let checkers = attackedFromBB b (occupancy b) (b^.B.opponent) (myKingPos b)
  in Legality b (checkers /= mempty) (pinned b) S.empty