Refactor account_games#index to reduce code complexity