Integrability versus non-integrability: hard hexagons and hard squares compared