<commit_before>#ifndef CONTROLLER_H
#define CONTROLLER_H

#include "includes.h"

class Controller
{
public:
	Controller(unsigned int width, unsigned int height);
	~Controller();

	void onKeyPressed(sf::Event::KeyEvent event);
	void onKeyReleased(sf::Event::KeyEvent event);
	void onMouseDown(sf::Event::MouseButtonEvent event);
	void onMouseUp(sf::Event::MouseButtonEvent event);

	void init();

	void draw(sf::RenderWindow * window);
	void redrawCanvas();
	void update(float delta);

	sf::Vector2i m_MousePosition;

private:
	struct _t_cell
	{
		bool metal;
		bool north, east, south, west;
		unsigned char material;

		_t_cell::_t_cell()
		{
			metal = false;
			north = false;
			east = false;
			south = false;
			west = false;
			material = 0;
		}

		void _t_cell::copyFrom(const _t_cell * other, bool copyConnections = false)
		{
			if(copyConnections)
			{
				north = other->north;
				east = other->east;
				south = other->south;
				west = other->west;
			}
			material = other->material;
		}

		void _t_cell::clear()
		{
			north = false;
			east = false;
			south = false;
			west = false;
			material = 0;
		}
	};

	bool _m_MouseLeftIsDown, _m_MouseRightIsDown;

	_t_cell * _m_Grid[2];
	bool * _m_ViaGrid;
	_t_cell _m_CurrentBrush;
	unsigned int _m_BrushIndex;
<commit_msg>Added 'high' attribute to cells.<commit_after>#ifndef CONTROLLER_H
#define CONTROLLER_H

#include "includes.h"

class Controller
{
public:
	Controller(unsigned int width, unsigned int height);
	~Controller();

	void onKeyPressed(sf::Event::KeyEvent event);
	void onKeyReleased(sf::Event::KeyEvent event);
	void onMouseDown(sf::Event::MouseButtonEvent event);
	void onMouseUp(sf::Event::MouseButtonEvent event);

	void init();

	void draw(sf::RenderWindow * window);
	void redrawCanvas();
	void update(float delta);

	sf::Vector2i m_MousePosition;

private:
	struct _t_cell
	{
		bool metal;
		bool high;
		bool north, east, south, west;
		unsigned char material;

		_t_cell::_t_cell()
		{
			metal = false;
			north = false;
			east = false;
			south = false;
			west = false;
			high = false;
			material = 0;
		}

		void _t_cell::copyFrom(const _t_cell * other, bool copyConnections = false)
		{
			if(copyConnections)
			{
				north = other->north;
				east = other->east;
				south = other->south;
				west = other->west;
			}
			material = other->material;
		}

		void _t_cell::clear()
		{
			north = false;
			east = false;
			south = false;
			west = false;
			high = false;
			material = 0;
		}
	};

	bool _m_MouseLeftIsDown, _m_MouseRightIsDown;

	_t_cell * _m_Grid[2];
	bool * _m_ViaGrid;
	_t_cell _m_CurrentBrush;
	unsigned int _m_BrushIndex;

{'fraction_non_alphanumeric': 0.11818181818181818, 'fraction_numerical': 0.0030303030303030303, 'mean_word_length': 3.836996336996337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2081321', 'n_tokens_mistral': 1103, 'n_tokens_neox': 943, 'n_words': 226}