<commit_before>#include "../include/game/Menu.hpp"
#include "../include/game/Game.hpp"
#include "../include/game/Settings.hpp"

#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Image.hpp>

#include <string>
#include <cstdlib> // srand
#include <ctime> // time

int main()
{
    std::srand(std::time(nullptr));


    sf::RenderWindow window;

    window.create(sf::VideoMode(800,450), "Kroniax", sf::Style::Default, sf::ContextSettings(24,8,4));
    window.setFramerateLimit(200);
    window.setKeyRepeatEnabled(false);

    sf::Image tex;
    tex.loadFromFile("data/sprites/icon.png");
    window.setIcon(64,64,tex.getPixelsPtr());

    settings::Load();

    while(window.isOpen())
    {
        Menu menu(window);

        std::string value = menu.Run();

        if(value == "exit")
        {
            window.close();
        }

        if(value == "game")
        {
            Game* game = nullptr;
            std::string returnValue;

            do
            {
                game = new Game(window);

                settings::SetSpeedY(0);
                settings::SetDownforce(settings::GetStartDownforce());
                settings::SetSpeedX(settings::GetStartSpeedX());
                returnValue = game->Run(menu.GetLevelName());

                if(game)
                    delete game;

                game = nullptr;
                game = new Game(window);

            }while(returnValue == "restart");

            if(game)
            {
                delete game;
                game = nullptr;
            }

            if(returnValue == "win")
            {

            }

        }
    }

    settings::Save();

    return 0;
}<commit_msg>Removed the manual memory management<commit_after>#include "../include/game/Menu.hpp"
#include "../include/game/Game.hpp"
#include "../include/game/Settings.hpp"

#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Image.hpp>

#include <string>
#include <cstdlib> // srand
#include <ctime> // time

int main()
{
    std::srand(std::time(nullptr));


    sf::RenderWindow window;

    window.create(sf::VideoMode(800,450), "Kroniax", sf::Style::Default, sf::ContextSettings(24,8,4));
    window.setFramerateLimit(200);
    window.setKeyRepeatEnabled(false);

    sf::Image tex;
    tex.loadFromFile("data/sprites/icon.png");
    window.setIcon(64,64,tex.getPixelsPtr());

    settings::Load();

    while(window.isOpen())
    {
        Menu menu(window);

        std::string value = menu.Run();

        if(value == "exit")
        {
            window.close();
        }

        if(value == "game")
        {
            std::string returnValue;

            do
            {
                Game game(window);

                settings::SetSpeedY(0);
                settings::SetDownforce(settings::GetStartDownforce());
                settings::SetSpeedX(settings::GetStartSpeedX());

                returnValue = game.Run(menu.GetLevelName());

            }while(returnValue == "restart");

        }
    }

    settings::Save();

    return 0;
}
{'fraction_non_alphanumeric': 0.15166340508806261, 'fraction_numerical': 0.012393998695368558, 'mean_word_length': 2.02465483234714, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7408532', 'n_tokens_mistral': 965, 'n_tokens_neox': 891, 'n_words': 143}