#ifndef __STRUCTS_H__
#define __STRUCTS_H__

struct Species{
	unsigned char intelligence;
    unsigned char strength;
    unsigned char speed;
    unsigned char imunity; //each time contact with another tribe doesn't kill them this goes up

	unsigned char temp_l;
	unsigned char temp_h;

	//char ideal_temp; //ideal temperature for this tribe  celcius  -128 to 127   26 to 33 ?
	//intelligence must account for tolerance outside this range

	//The coldest natural temperature ever recorded on Earth was -89.2 °C (-128.6 °F)
	//The hottest 57.8 °C (136.0 °F)
	//hottest inhabited place, average daily maximum (over 6yrs) 41.1 °C (106.0 °F).
	//coldest inhabited place, daily average in January -46 °C (-51 °F)
	// human tolerance 35-48 ? 32.3 to 40 degrees C effective temperature-basic
    //unsigned char temp_high;
	//unsigned char temp_low;
    //unsigned char food_type;
    //unsigned char food_amount_req;
    //unsigned char water_amount_req;
    unsigned char reproductive_rate;  //range between ... fixed to 1 for now
    unsigned char fight_flight_balance; //chance to run or fight if contact with hostile tribe  0=fight everytime 255=run everytime
    unsigned char migration_factor; //propensity to migrate  0=don't move ever  255=move every cycle
    unsigned char social_factor; //likelyhood to want to mate/mingle with compatible tribe 0=don't like others 255=likes everybody that is compat
    unsigned char max_age;  //dies at this age if not killed otherwise
	unsigned char cur_age;
    //unsigned char gender;
	//unsigned char fought;
	//unsigned char mated;
};

struct image_attr{
    size_t width;
    size_t height;
    //int format;
    int16_t **data; //elevation 
    unsigned char *image; //rgb
    //int status;
    int cur_sealevel;
};

struct Stats{
	uint32_t disease;
	uint32_t drown;
	uint32_t old_age;
	uint32_t died_attacking;
	uint32_t died_defending;
	uint32_t new_life;
	uint32_t new_species;
	//uint32_t species_extinct;

	uint64_t t_disease;
	uint64_t t_drown;
	uint64_t t_old_age;
	uint64_t t_died_attacking;
	uint64_t t_died_defending;
	uint64_t t_new_life;
	uint64_t t_new_species;
	//uint64_t t_species_extinct;
}stats;

struct Thread_I{
	unsigned int start_h;
	unsigned int end_h;
}*thread_i;
//struct Thread_I *thread_i;

//struct image_attr *ia;

#endif