Refactored BMInterface->search_game_history() to reduce cyclomatic complexity