<commit_before>#include <iostream>
#include "LifeModel.h"

using namespace std;

void println(LifeModel& model)
{
	for (int i = 0; i != 7; i++)
	{
		for (int j = 0; j != 7; j++)
		{
			cout << model.getCell(i, j);
		}
		cout << endl;
	}
}

int main()
{
	int width = 7;
	int height = 7;
	LifeModel model(width, height);
	model.setCellOn(2, 2);
	model.setCellOn(2, 3);
	model.setCellOn(2, 1);

	println(model);
	model.simulate();
	println(model);
	model.simulate();
	println(model);
	return 0;
}<commit_msg>main window was added<commit_after>#include <iostream>
#include <SDL2/SDL.h>
#include "LifeModel.h"

using std::cerr;
using std::endl;

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

SDL_Window* window = NULL;
SDL_Surface* surface = NULL;

bool init()
{
	bool success = true;

	if (SDL_Init(SDL_INIT_VIDEO) < 0)
	{
		cerr << "SDL could not be initialized: " << SDL_GetError() << endl;
		success = false;
	}
	else
	{
		window = SDL_CreateWindow("Life", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
		if (window == NULL)
		{
			cerr << "Window could not be created: " << SDL_GetError() << endl;
			success = false;
		}
		else
		{
			surface = SDL_GetWindowSurface(window);
			SDL_FillRect(surface, NULL, SDL_MapRGB(surface->format, 0xFF, 0xFF, 0xFF));
		}
	}
	return success;
}

void close()
{
	SDL_DestroyWindow(window);
	window = NULL;
	SDL_Quit();
}

int main(int argc, char** argv)
{
	if (init())
	{
		bool quit = false;
		SDL_Event event;

		while (!quit)
		{
			while (SDL_PollEvent(&event) != 0)
			{
				if (event.type == SDL_QUIT)
				{
					quit = true;
				}
			}
			SDL_UpdateWindowSurface(window);
		}
	}
	close();
	return 0;
}
{'fraction_non_alphanumeric': 0.15254237288135594, 'fraction_numerical': 0.015195791934541203, 'mean_word_length': 3.782122905027933, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 7, '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': '869496', 'n_tokens_mistral': 782, 'n_tokens_neox': 680, 'n_words': 162}