Extract game_end method