Added checks for the win and lose state of the game model