<commit_before>#include "gameselectionscreen.hpp"
#include "developerscreen.hpp"
#include "gui.h"

void GameSelectionScreen::Update()
{

}

void GameSelectionScreen::FilterGameDefinitions()
{
    mVisibleGameDefinitions.reserve(mGameDefinitions.size());
    for (const auto& gd : mGameDefinitions)
    {
        if (!gd.Hidden())
        {
            mVisibleGameDefinitions.emplace_back(&gd);
        }
    }
}

void GameSelectionScreen::Render(int /*w*/, int /*h*/, Renderer& /*renderer*/)
{
    gui_begin_window(mGui, "Select game");

    for (size_t idx = 0; idx < mVisibleGameDefinitions.size(); idx++)
    {
        const  GameDefinition& gd = *mVisibleGameDefinitions[idx];
        if (gui_radiobutton(mGui, gd.Name().c_str(), mSelectedGameDefintionIndex == idx))
        {
            mSelectedGameDefintionIndex = idx;
        }

    }

    bool change = false;
    if (gui_button(mGui, "Start game"))
    {
        if (mVisibleGameDefinitions[mSelectedGameDefintionIndex]->DataSetName() == "Developer")
        {
            change = true;
        }
    }

    gui_end_window(mGui);
    if (change)
    {
        // "this" will be deleted after this call, so must be last call in the function

        mStateChanger.ToState(std::make_unique<DevloperScreen>(mGui, mStateChanger, mFmv, mSound, mLevel, mFsOld));
    }
}<commit_msg>clean up<commit_after>#include "gameselectionscreen.hpp"
#include "developerscreen.hpp"
#include "gui.h"

void GameSelectionScreen::Update()
{

}

void GameSelectionScreen::FilterGameDefinitions()
{
    mVisibleGameDefinitions.reserve(mGameDefinitions.size());
    for (const auto& gd : mGameDefinitions)
    {
        if (!gd.Hidden())
        {
            mVisibleGameDefinitions.emplace_back(&gd);
        }
    }
}

void GameSelectionScreen::Render(int /*w*/, int /*h*/, Renderer& /*renderer*/)
{
    gui_begin_window(mGui, "Select game");

    for (size_t idx = 0; idx < mVisibleGameDefinitions.size(); idx++)
    {
        const GameDefinition& gd = *mVisibleGameDefinitions[idx];
        if (gui_radiobutton(mGui, gd.Name().c_str(), mSelectedGameDefintionIndex == idx))
        {
            mSelectedGameDefintionIndex = idx;
        }

    }

    bool gotoDevMode = false;
    if (gui_button(mGui, "Start game"))
    {
        const GameDefinition& gd = *mVisibleGameDefinitions[mSelectedGameDefintionIndex];

        // TODO: Validate we have all of the required data sets to launch the game

        if (gd.DataSetName() == "Developer")
        {
            gotoDevMode = true;
        }
    }

    gui_end_window(mGui);
    if (gotoDevMode)
    {
        // "this" will be deleted after this call, so must be last call in the function

        mStateChanger.ToState(std::make_unique<DevloperScreen>(mGui, mStateChanger, mFmv, mSound, mLevel, mFsOld));
    }
}
{'fraction_non_alphanumeric': 0.12371134020618557, 'fraction_numerical': 0.0007109847138286527, 'mean_word_length': 2.924686192468619, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '787193', 'n_tokens_mistral': 921, 'n_tokens_neox': 884, 'n_words': 185}