#include "city_world_map_1_1.h"
//#include "var.h"
#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctime>
#include <iostream>
#include <unistd.h>
#include <random>
#include <sstream>
#include <cassert>
//#include <string>

using namespace std;
int num10;
//int ghost_one=0;
sic_mundus_creatus_est::world::world() {
//map[ELEMENTS][ELEMENTS];
}

sic_mundus_creatus_est::world::world(std::string harmonious_seed1, std::string harmonious_seed2) {
//map[ELEMENTS][ELEMENTS];
if (harmonious_seed1.size()<8||harmonious_seed1.size()>8){printf("error string.size() in seed 1"); exit(0);}
if (harmonious_seed2.size()<8||harmonious_seed2.size()>8){printf("error string.size() in seed 2"); exit(0);}
int x[4];
char y[4];
for (int i=0, n=0;i<8;i=i+2,n++){
std::stringstream steam;
std::string vapor;
steam<<harmonious_seed1.substr(i,2);
//steam<<vapor;
steam>>x[n];

printf("test seed1 %i",x[n]);
if ( (x[n]>=10)&&(x[n]<=99))continue; else {printf("error harmonious_seed1 <=99 and >=10"); exit(0);}
}

int z[8];
char w[8];
for (int i=0;i<8;i++){
w[i]=harmonious_seed2[i];

z[i]=w[i]-'0';
printf("test seed %i, %c",z[i], w[i]);
if ( (z[i]>0)&&(z[i]<=9))continue; else {printf("error harmonious_seed2 <=9 and >0");exit(0);}
}


world_generate(x[0],x[1],x[2],x[3],z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]);
}

sic_mundus_creatus_est::world& sic_mundus_creatus_est::world::world_generate(int southsizeseed1, int westsizeseed2, int northsizeseed3, int eastsizeseed4, int seed1a, int seed1b, int seed2a, int seed2b, int seed3a, int seed3b, int seed4a, int seed4b){
//MAP MATRIX
	int x,y,num10;
	int ghost_one=0;
	srand(time(NULL));

for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<ELEMENTS; y++){
	       	map[x][y]=30;}}

		
// MAP MATRIX END

// procedural var	
int  rando, xx, yy, P=1;
static int ya, xa;
bool dex, six, down, up;
map[x=35][y=35]=num10;
num10=20;

xx=x;
yy=y;
xa=x;
ya=y;
int r, base3=0;


	int n=1;//this increases by 1 each time  
	int h=3;// this increase by h+2 each time
	int j=2;
 int vb=20; // for bottom left, start vortex
int count=0;// for no check first element
int contatore;
printf("procedurale 100\n");
map[35][36]=num10;





for (y; y>yy-35; y-- ){x=xx; printf("procedurale 10x\n");;
	for (x=xx-P; x<=xx+P; x++){ printf("procedurale 10y\n");
	
		if (y==yy){map[x][y]=num10; continue;}
		if (y==yy-n){base3++; //count for trigger other 3 cicle for// this back 0 each time 
			if (n==1){
					r=rand()%100;	       
					if(r>southsizeseed1){ map[x][y]=num10+1;}else{map[x][y]=num10;}}
			if(n>1){
				count++;
				int v; v=map[x][y+1];// map check
			
				r=rand()%100; if(r>southsizeseed1){if(v>=(num10+30))goto vortex; map[x][y]=v+1;}else{map[x][y]=v;}// check and horizontal creation
				if(count==1){ vb=map[x+1][y+1]; if(r>southsizeseed1){ map[x][y]=vb+1; continue; }else map[x][y]=vb; continue;}// tilted check and value setting 

int vy;
				vy=map[x-1][y];
int vyv;			vyv=v-vy;   

				//blur parameters
				if (vyv>seed1a){ map[x][y]=v-1;    }
				if (vyv>seed1b){ map[x][y]=v-1;    }
				if (vyv<-seed1a){ map[x][y]=v+1;   } 
				if (vyv<-seed1b){ map[x][y]=v+1;   }
			}
vortex:
			if (base3==h){// end cycle square base

/////////////////////////////////////////////////////////////////////////////////////////////

				contatore=0;  //count for no check first vertical element 		
				// y right ascendant vortex
				for (int a=y; a<=y+j; a++){ 
				       	int v; v=map[x-1][a];//check map
				contatore++;	
				r=rand()%100; if(r>westsizeseed2){ if(v>=(num10+30))continue; map[x][a]=v+1;}else{map[x][a]=v;}// check and vertical creation
				// equalizer vertical
				if(contatore==1)continue;
int vy;
				vy=map[x][a-1];
int vyv;			vyv=v-vy;     


				if (vyv>seed2a){ map[x][a]=v-1;  }
				if (vyv>seed2b){ map[x][a]=v-1;  } 
				if (vyv<-seed2a){ map[x][a]=v+1; }
				if (vyv<-seed2b){ map[x][a]=v+1; }
				}//end ascendant vortex	

////////////////////////////////////////////////////////////////////////////////
							contatore=0;
				// leftward vortex 
				for (int a=x; a>=x-j; a--){
					contatore++;
				  int v; v=map[a][y+j-1];// map check

				r=rand()%100; if(r>northsizeseed3){if(v>=(num10+30))continue; map[a][y+j]=v+1;}else{map[a][y+j]=v;}// check and horizontali creation
				if(contatore==1)continue;
int vy;
				vy=map[a+1][y+j];
int vyv;			vyv=v-vy; 
				if (vyv>seed3a){ map[a][y+j]=v-1; } 
				if (vyv>seed3b){ map[a][y+j]=v-1; }  
				if (vyv<-seed3a){ map[a][y+j]=v+1;}
				if (vyv<-seed3b){ map[a][y+j]=v+1;}
				}//end leftward vortex		
							contatore=0;	

////////////////////////////////////////////////////////////////////////////////
//
				// left vortex descending
				for (int a=y+j; a>=y; a--){
		contatore++;
				  int v; v=map[x-j+1][a];// map check
				r=rand()%100; if(r>eastsizeseed4){if(v>=(num10+30))continue; map[x-j][a]=v+1;}else{map[x-j][a]=v;}// check and vertical creation
				if(contatore==1)continue;
int vy;
				vy=map[x-j][a+1];
int vyv;			vyv=v-vy;     
		
				if (vyv>seed4a){ map[x-j][a]=v-1;}   
				if (vyv>seed4b){ map[x-j][a]=v-1;}   
				if(vyv<-seed4a){ map[x-j][a]=v+1;} 
				if(vyv<-seed4b){ map[x-j][a]=v+1;} 
			
			
			}//end down vortex
							contatore=0;	
		/// parameters for procedural vortex		
		base3=0;
		n++;	
		h=h+2;
		j=j+2;
		}}
		/////////////////////////
		 

	}// fine for x
	count=0;
	P=P+1;
	printf("end cycle X\n");

	
	}// fine for y

printf("matrix cells value 1-------------------------------------------------------------------------------");
for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<ELEMENTS; y++){
	       if (map[x][y]>29||map[x][y]<20)map[x][y]=1;// delete all matrix value ( setting value 1) 
	}}




printf("matrix edge cells value 1-------------------------------------------------------------------------------");
for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<1; y++){
	       map[x][y]=1;// delete all matrix rim value ( setting value 1) 
	}}
printf("matrix edge cells value 1-------------------------------------------------------------------------------");
for (int y=0; y<ELEMENTS; y++){
	for (int x=0; x<1; x++){
	       map[x][y]=1;// delete all matrix rim value ( setting value 1) 
	}}
printf("matrix edge cells value 1-------------------------------------------------------------------------------");
for (int y=0; y<ELEMENTS; y++){
	for (int x=69; x>68; x--){
	       map[x][y]=1;// delete all matrix rim value ( setting value 1) 
	}}
printf("matrix edge cells value 1-------------------------------------------------------------------------------");
for (int x=0; y<ELEMENTS; y++){
	for (int y=69; y>68; y--){
	       map[x][y]=1;// delete all matrix rim value ( setting value 1) 
	}}




printf("check matrix horizontal cells--------------------------------");
for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<ELEMENTS; y++){
		
	       if (map[x][y]>=20 && map[x][y+1]==1 && map[x][y-1]==1)map[x][y]=1;// to cut the horizontal long branches 
	}}

printf("check matrix cells vertical--------------------------------");
for (int y=0; y<ELEMENTS; y++){
	for (int x=0; x<ELEMENTS; x++){
		
	       if (map[x][y]>=20 && map[x+1][y]==1 && map[x-1][y]==1)map[x][y]=1;// to cut the vertical long branches 
	}}

fine:
return *this;
}

void  sic_mundus_creatus_est::world::world_test(){
//MAP MATRIX
for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<ELEMENTS; y++){
	       	map[x][y]=1;}}

map[35][35]=20;

}
/*
int& sic_mundus_creatus_est::world::get(int x,int y)const  noexcept {
return map[x][y];
}
*/
int& sic_mundus_creatus_est::world::matrix_value(int x,int y)const  noexcept {

return ptr[x][y];
}

 

// world end




//map_sectors
sic_mundus_creatus_est::map_sector::map_sector() {
int y=0;
ptr_matrix = new int***[70]; // Allocazione del primo livello (puntatori a puntatori a puntatori)

for (int i = 0; i < 70; i++) {
    ptr_matrix[i] = new int**[70]; // Allocazione del secondo livello
				}
for (int i=0; i<70;i++){
	for (int j=0;j<70;j++){ ptr_matrix[i][j]=new int*[351];	
			}
			}

for (int i=0; i<70;i++){
    for (int j = 0; j < 70; j++) {
       // ptr_matrix[i][j] = new int*[351]; // Allocazione del terzo livello
        for (int k = 0; k < MAP_SECTOR_ELEMENTS+1; k++) {//y++;	printf("indice %i",y);
            ptr_matrix[i][j][k] = new int [ 351]; // Allocazione del quarto livello
        }
    }
}


for (int x=0; x<2; x++){

	for (int y=0; y<2; y++){printf("valori 10 \n");
			
		for (int z=0; z<MAP_SECTOR_ELEMENTS; z++){
			
			for (int w=0; w<MAP_SECTOR_ELEMENTS; w++){
//*(ptr + x * MAP_SECTOR_ELEMENTS * MAP_SECTOR_ELEMENTS * 2 + y * MAP_SECTOR_ELEMENTS * 2 + MAP_SECTOR_ELEMENTS * 2 + MAP_SECTOR_ELEMENTS) = 10;
	      	ptr_matrix[x][y][z][w]=1;//=sic_mundus_creatus_est.matrix_value(x,y);
	//	assert(ptr_matrix[x][y][MAP_SECTOR_ELEMENTS][MAP_SECTOR_ELEMENTS]!=0);
}
//printf("esce primo ciclo");
}
}
}
//printf("esce secondo ciclo");
map_sectors_generate();
}


void sic_mundus_creatus_est::map_sector::map_sectors_generate(){
//pointer alias
int**** map_sectors=ptr_matrix;

	//MAP_SECTOR MATRIX
//	int x,y;
	srand(time(NULL));
//map[x][y];
int support;	
int x_spectrum=1;
int n_roads_vertical, n_roads_horizontal;
int x_neighborhoods,y_neighborhoods;
for (int x=0; x<ELEMENTS; x++){
	for (int y=0; y<ELEMENTS; y++){
printf("map_sector_generate read SECOND CYCLE: x___%i, y____ %i\n",x,y);
	//	int z=0,w=0;
		if(map_sectors[x][y][MAP_SECTOR_ELEMENTS][MAP_SECTOR_ELEMENTS]==1){printf("value==1 (%d)continue\n",map_sectors[x][y][MAP_SECTOR_ELEMENTS][MAP_SECTOR_ELEMENTS]);continue;}
		if(map_sectors[x][y][MAP_SECTOR_ELEMENTS][MAP_SECTOR_ELEMENTS]>19){
		if (x!=x_spectrum){n_roads_vertical=(rand()%3)+2;n_roads_horizontal=(rand()%3)+2;x_spectrum=x; //generate new random number each new sector 
		x_neighborhoods=MAP_SECTOR_ELEMENTS/n_roads_vertical;y_neighborhoods=MAP_SECTOR_ELEMENTS/n_roads_horizontal;} //generate x and y neighborhoods
	printf("VERTICAL road|||||||\n");							
			for(int z=0; z<MAP_SECTOR_ELEMENTS; z++){

		for (int w=0; w<MAP_SECTOR_ELEMENTS;w++){
		if(z==MAP_SECTOR_ELEMENTS-1){map_sectors[x][y][z][w]=3;continue;}//road right border
		if(z==MAP_SECTOR_ELEMENTS-2){map_sectors[x][y][z][w]=3;continue;}//road right border
		if(z==MAP_SECTOR_ELEMENTS-3){map_sectors[x][y][z][w]=3;continue;}//road right border
		if(z==MAP_SECTOR_ELEMENTS-4){map_sectors[x][y][z][w]=3;continue;}//road right border
		if(z==MAP_SECTOR_ELEMENTS-5){map_sectors[x][y][z][w]=3;continue;}//road right border

		if(w==MAP_SECTOR_ELEMENTS-1){map_sectors[x][y][z][w]=3;continue;}//road top border
		if(w==MAP_SECTOR_ELEMENTS-2){map_sectors[x][y][z][w]=3;continue;}//road top border
		if(w==MAP_SECTOR_ELEMENTS-3){map_sectors[x][y][z][w]=3;continue;}//road top border
		if(w==MAP_SECTOR_ELEMENTS-4){map_sectors[x][y][z][w]=3;continue;}//road top border
		if(w==MAP_SECTOR_ELEMENTS-5){map_sectors[x][y][z][w]=3;continue;}//road top border





					//	printf("map_sector_generate Z%i,W%i\n",z,w);
		if (	z==x_neighborhoods  ||z==x_neighborhoods+1  ||z==x_neighborhoods+2  || z==x_neighborhoods+3   ||z==x_neighborhoods+4   ||
			z==x_neighborhoods*2||z==x_neighborhoods*2+1||z==x_neighborhoods*2+2|| z==x_neighborhoods*2+3 ||z==x_neighborhoods*2+4 ||
			z==x_neighborhoods*3||z==x_neighborhoods*3+1||z==x_neighborhoods*3+2|| z==x_neighborhoods*3+3 ||z==x_neighborhoods*3+4 ||
			z==x_neighborhoods*4||z==x_neighborhoods*4+1||z==x_neighborhoods*4+2|| z==x_neighborhoods*4+3 ||z==x_neighborhoods*4+4 ||
			z==x_neighborhoods*5||z==x_neighborhoods*5+1||z==x_neighborhoods*5+2|| z==x_neighborhoods*5+3 ||z==x_neighborhoods*5+4 ||
								
//	printf("Horizontal road_______\n");							

							
			w==y_neighborhoods  ||w==y_neighborhoods+1   ||w==y_neighborhoods+2   || w==y_neighborhoods+3   ||w==y_neighborhoods+4 ||
			w==y_neighborhoods*2||w==y_neighborhoods*2+1 ||w==y_neighborhoods*2+2 || w==y_neighborhoods*2+3 ||w==y_neighborhoods*2+4 ||
			w==y_neighborhoods*3||w==y_neighborhoods*3+1 ||w==y_neighborhoods*3+2 || w==y_neighborhoods*3+3 ||w==y_neighborhoods*3+4 ||
			w==y_neighborhoods*4||w==y_neighborhoods*4+1 ||w==y_neighborhoods*4+2 || w==y_neighborhoods*4+3 ||w==y_neighborhoods*4+4 ||
			w==y_neighborhoods*5||w==y_neighborhoods*5+1 ||w==y_neighborhoods*5+2 || w==y_neighborhoods*5+3 ||w==y_neighborhoods*5+4 
									)
 
									{map_sectors[x][y][z][w]=3;printf("value 3 (first if)\n");}else// road 
									{map_sectors[x][y][z][w]=2;printf("value 2 (else)\n),");}//y neighborhoods
	




	printf("Valore map_sectors[%d][%d][%d][%d]==%d value map_sector[%d][%d][ELEMENTS+1][ELEMENTS+1]=%d\n",x,y,z,w, map_sectors[x][y][z][w],x,y, map_sectors[x][y][MAP_SECTOR_ELEMENTS][MAP_SECTOR_ELEMENTS]);
						}}// close cycles z w 
						printf("close cycle z w\n");
						}// close if >19
						printf("close if >19\n");
						}}// close cycles x y 
						printf("close cycles x y\n");


//int rand0, rand1, rand2, rand3;
//rand0=rand()%2+3

//da verificare
/*
int x_array[2],y_array[2];
int x_sector_below_left=150,y_sector_below_left=250,x_sector_top_right=250,y_sector_top_right=90; 
map_sectors[4][4][x_sector_below_left][y_sector_below_left]=99; // these numbers will have a random placement
map_sectors[6][6][x_sector_top_right][y_sector_top_right]=99; // these numbers will have a random placement

for(int x=0,y=0; ; y++,x++){	
if(map_sectors[4][4][x_sector_below_left+x][y_sector_below_left+y]==3){x_array[0]=x_sector_below_left+x;y_array[0]=y_sector_below_left+y;break;}
}//x

for(int x=0,y=0; x<1000,y<1000; y--,x--){	
if(map_sectors[6][6][x+x_sector_top_right][y+y_sector_top_right]==3){x_array[1]=x+x_sector_top_right;y_array[1]=y+y_sector_top_right;break;}
}//y


map_sectors[4][4][x_array[0]][y_array[0]]=1; // test
map_sectors[6][6][x_array[1]][y_array[1]]=1; // test
printf("array 0x value=%i\n array 0y value=%i\n",x_array[0],y_array[0]);
printf("array 1x value=%i\n array 1y value=%i\n",x_array[1],y_array[1]);
*/


/////////////////////////////////////////////////////////////////////////
/*
//inclined streets
int ax,axx,by,byy;
int x_spectrum_a, y_spectrum_a,x_spectrum_b,y_spectrum_b;
int a=4,b=4, a_phantom, b_phantom, spectre_a, spectre_b;
int a1=6,b1=6;
bool end=true;
	static 	int	n = 0,
			cont = 0,
			cont1 = 0,
			possesso = 1,
			x,y;
		 double dist, seno, cosen, distp, incr = 0, incrY = 0, incrX = 0, prova;
	int new_x,new_y,new_x1,new_y1;

new_x=0; new_y=0;// new_x1=(350-x_array[0])+(a1-a-1)*350+x_array[1]; new_y1=(350-y_array[0])+(b1-b-1)*350+y_array[1];
if (a<a1){ new_x1=(350-x_array[0])+(a1-a-1)*350+x_array[1]; new_y1=(350-y_array[0])+(b1-b-1)*350+y_array[1];}
if (a>a1){ new_x1=(350-x_array[1])+(a-a1-1)*350+x_array[0]; new_y1=(350-y_array[0])+(b1-b-1)*350+y_array[1];}

do{
			printf("N_VALUE= %i \n", n);
//////// BOTTOM-LEFT TO TOP-RIGHT // MOVE X //  ANGLE <45
	//////////////////////////////////////////////////////////////
			if (new_x1 > new_x && new_y1 > new_y) {   /// check position	
					n++;// 
			if (incrY != 0) { goto skip1; }// skip the check and the calculate
			if (incrX != 0) { goto skip2; }// idem
			if(n==1){x_spectrum_a=x_array[0];y_spectrum_a=y_array[0];a_phantom=a; b_phantom=b;}
			
			x = new_x1 - new_x;// put out long int  /////distance calculation
			y = new_y1 - new_y;//put out long int 
			dist = sqrt(x * x + y * y);
			printf("dist x=%i dist y=%i",x,y);

			if (x > y) {////////
				seno = y / dist;	// 
				cosen = x / dist;	// 
				distp = n / cosen;	// 
				incr = distp * seno;
				printf("seno=%f\n cos=%f\n distp=%f\n incr=%f\n", seno, cosen, distp, incr);//
//					
			skip1:// 
			
				incrY = incr * n;
				printf("INCRy= %f \n", incrY);
				new_x++;
				new_y=(int)incrY;	
		
				goto skip;
			}////////END   BOTTOM-LEFT TO TOP-RIGHT // MOVE X // ANGLE <45
				

			if (x == y) {///////// ANGLE 45
				new_x++; new_y++;
				
				goto skip;
			}///////// END ANGLE 45
				

			if (y > x) {////////ANGLE >45 MOVE Y:
				seno = x / dist;	// 
				cosen = y / dist;	//
				distp = n / cosen;	// 
				incr = distp * seno;
				printf("seno=%f\n cos=%f\n distp=%f\n incr=%f\n", seno, cosen, distp, incr);

				
			skip2:
				incrX = incr * n;
				printf("INCRx= %f \n", incrX);

				new_y++;//
				//new_x=0;
				new_x=(int)incrX;
						goto skip;
			}////////END ANGLE >45 //MOVE Y
			//goto skip;
		}/////END ALL MOVE T BOTTOM-LEFT TO TOP-RIGHT



//////// BOTTOM-RIGHT TO TOP-LEFT // MOVE X //  ANGLE <45
	//////////////////////////////////////////////////////////////
			if (new_x1 < new_x && new_y1 > new_y) {   /// check position
					n++;// 
			if (incrY != 0) { goto skip3; }// skip the check and the calculate
			if (incrX != 0) { goto skip4; }// idem
			if(n==1){x_spectrum_a=x_array[0];y_spectrum_a=y_array[0];a_phantom=a; b_phantom=b;}
			
			x = new_x - new_x1;// put out long int  /////distance calculation
			y = new_y1 - new_y;//put out long int 
			dist = sqrt(x * x + y * y);
			printf("dist x=%i dist y=%i",x,y);

			if (x > y) {////////
				seno = y / dist;	// 
				cosen = x / dist;	// 
				distp = n / cosen;	// 
				incr = distp * seno;
				printf("seno=%f\n cos=%f\n distp=%f\n incr=%f\n", seno, cosen, distp, incr);//
//					
			skip3:// 
			
				incrY = incr * n;
				printf("INCRy= %f \n", incrY);
				new_x--;
				new_y=(int)incrY;	
		
				goto skip;
			}////////END BOTTOM-RIGHT TO TOP-LEFT // MOVE X // ANGLE <45
				

			if (x == y) {///////// ANGLE 45
				new_x--; new_y++;
				
				goto skip;
			}///////// END ANGLE 45
				

			if (y > x) {////////ANGLE >45 MOVE Y:
				seno = x / dist;	// 
				cosen = y / dist;	//
				distp = n / cosen;	// 
				incr = distp * seno;
				printf("seno=%f\n cos=%f\n distp=%f\n incr=%f\n", seno, cosen, distp, incr);

				
			skip4:
				incrX = incr * n;
				printf("INCRx= %f \n", incrX);

				new_y++;//
				//new_x=0;
				new_x=-(int)incrX;
						goto skip;
			}////////END ANGLE >45 //MOVE Y
			//goto skip;


		}/////END ALL MOVE BOTTOM-RIGHT TO TOP-LEFT 

//inclined streed






skip:
			printf("x_array 0= %i \n", new_x);
			printf("y_array 0= %i \n", new_y);
//skip: 
if(a==a_phantom)x_array[0]=x_spectrum_a+new_x;
if(b==b_phantom)y_array[0]=y_spectrum_a+new_y;
if(a!=a_phantom){spectre_a=a-a_phantom-1;x_spectrum_b=350-x_spectrum_a;x_array[0]=new_x-x_spectrum_b-spectre_a*350;}										
if(b!=b_phantom){spectre_b=b-b_phantom-1;y_spectrum_b=350-y_spectrum_a;y_array[0]=new_y-y_spectrum_b-spectre_b*350;}
								


//if (x_array[0]==349&&y_array[0]==349){a++;b++;}
if (x_array[0]==349){a++;}
if (y_array[0]==349){b++;}


map_sectors[a][b][x_array[0]][y_array[0]]=3;
 
map_sectors[a][b][x_array[0]][y_array[0]-1]=3;
map_sectors[a][b][x_array[0]][y_array[0]-2]=3;
map_sectors[a][b][x_array[0]][y_array[0]-3]=3;
map_sectors[a][b][x_array[0]][y_array[0]-4]=3;
if(a==a1 && b==b1 && x_array[0]==x_array[1])end=false;
}while (end);
*/

//return *this;
}



/*
int& sic_mundus_creatus_est::map_sector::get(int x, int y, int z, int w)const noexcept{return ptr_matrix[x][y][z][w];}// SFML sistemare
int& sic_mundus_creatus_est::world::matrix_value(int x,int y)const  noexcept {

return ptr[x][y];
*/

/*
//city class
sic_mundus_creatus_est::city::city() {
//int (*ptr_matrix)[ELEMENTS][ELEMENTS][MAP_SECTOR_ELEMENTS+1][MAP_SECTOR_ELEMENTS+1];
//map_sectors[ELEMENTS][ELEMENTS][MAP_SECTOR_ELEMENTS+1][MAP_SECTOR_ELEMENTS+1];
}*/
