Fix bug: winning doesn’t end game properly