End conditions now checked after modals to improve UX on win/loss