<commit_before>#include "bananagrams.hpp"

using std::string;

Game::Game()
	: hand(font), messages(font)
{
	clear_buffer();
	selected = false;
	selecting = false;
}

Game::~Game()
{
	end();
}

bool Game::load(const std::string& filename)
{
	// TODO
	return false;
}

void Game::save(const std::string& filename)
{
	// TODO
}

void Game::clear_buffer()
{
	if (buffer != nullptr)
		delete buffer;
	buffer = nullptr;
}

void Game::end()<commit_msg>Init buffer to nullptr (fix segfault)<commit_after>#include "bananagrams.hpp"

using std::string;

Game::Game()
	: hand(font), messages(font)
{
	buffer = nullptr;
	clear_buffer();
	selected = false;
	selecting = false;
}

Game::~Game()
{
	end();
}

bool Game::load(const std::string& filename)
{
	// TODO
	return false;
}

void Game::save(const std::string& filename)
{
	// TODO
}

void Game::clear_buffer()
{
	if (buffer != nullptr)
		delete buffer;
	buffer = nullptr;
}

void Game::end()
{'fraction_non_alphanumeric': 0.17326203208556148, 'fraction_numerical': 0.0, 'mean_word_length': 4.7073170731707314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1802320', 'n_tokens_mistral': 352, 'n_tokens_neox': 349, 'n_words': 80}