added logic to restart the game after victory