<commit_before>/* <NAME>
April 14, 2015 */

#ifndef GENERATOR_H
#define GENERATOR_H

#include <array>
#include <fstream>
#include <ctime>

#include "constants.h"
#include "resources.h"

using namespace std;

class Generator
{
private:
	const int WORLD_X_DIMENSION = C::WORLD_X_DIMENSION;
	const int WORLD_Y_DIMENSION = C::WORLD_Y_DIMENSION;

	const int island_radius = (int)((double)WORLD_X_DIMENSION * .45); // assumes full map is square
	const unsigned x_center = WORLD_X_DIMENSION / 2;
	const unsigned y_center = WORLD_Y_DIMENSION / 2;
	const int biome_size = 25;

	const char water = C::WATER_CHAR;
	const char land = C::LAND_CHAR;
	const char forest = C::FOREST_CHAR;

	stringstream generator_pattern;

	string generated_terrain_dir;

public:
	vector<vector<char>> v1, v2, biome_map;

	Generator()
	{
		srand((unsigned)time(NULL)); // seed rand
		
		// create the timestamped directory
		generated_terrain_dir = C::game_directory + "/gen " + R::to_string(R::current_time_in_ms());
		R::create_path_if_not_exists(generated_terrain_dir);

		// fill both working vectors with empty space
		size_vector(v1, WORLD_X_DIMENSION, WORLD_Y_DIMENSION);
		size_vector(v2, WORLD_X_DIMENSION, WORLD_Y_DIMENSION);
	}

	void generate_biome_map();
	void generate_static_using_biome_map();

	// load or generate terrain, depending on if it exists
	/* void load_terrain_from_file()
	{<commit_msg>minor documentation updates<commit_after>/* <NAME>
April 14, 2015 */

#ifndef GENERATOR_H
#define GENERATOR_H

#include <array>
#include <fstream>
#include <ctime>

#include "constants.h"
#include "resources.h"

using namespace std;

class Generator
{
private:
	const int WORLD_X_DIMENSION = C::WORLD_X_DIMENSION;
	const int WORLD_Y_DIMENSION = C::WORLD_Y_DIMENSION;

	const int island_radius = (int)((double)WORLD_X_DIMENSION * .45); // assumes full map is square
	const unsigned x_center = WORLD_X_DIMENSION / 2;
	const unsigned y_center = WORLD_Y_DIMENSION / 2;
	const int biome_size = 25;

	const char water = C::WATER_CHAR;
	const char land = C::LAND_CHAR;
	const char forest = C::FOREST_CHAR;

	stringstream generator_pattern; // reflects the steps used to reach a generated terrain

	string generated_terrain_dir; // the path to place the terrain

	vector<vector<char>> v1, v2, biome_map;

public:

	Generator()
	{
		srand((unsigned)time(NULL)); // seed rand
		
		// create the timestamped directory
		generated_terrain_dir = C::game_directory + "/gen " + R::to_string(R::current_time_in_ms());
		R::create_path_if_not_exists(generated_terrain_dir);

		// fill both working vectors with empty space
		size_vector(v1, WORLD_X_DIMENSION, WORLD_Y_DIMENSION);
		size_vector(v2, WORLD_X_DIMENSION, WORLD_Y_DIMENSION);
	}

	void generate_biome_map();
	void generate_static_using_biome_map();

	// load or generate terrain, depending on if it exists
	/* void load_terrain_from_file()
	{
{'fraction_non_alphanumeric': 0.10251046025104603, 'fraction_numerical': 0.011157601115760111, 'mean_word_length': 5.305494505494505, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6316270', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1043, 'n_words': 255}