#ifndef DICTATORSHIP_H #define DICTATORSHIP_H #define REL_AMOUNT 5 #define PROD_AMOUNT 5 #define MAT_AMOUNT 3 #define TECHS_AMOUNT 4 typedef enum { FALSE = 0, TRUE } bool; /*** Politic ***/ typedef enum { S_RIGHT, S_LEFT } Side; typedef enum { R_BFF, R_FRIEND, R_VERYGOOD, R_GOOD, R_NEUTRAL, R_BAD, R_VERYBAD, R_ENNEMY, R_WORSTENEMY } Relation; /*** Items ***/ typedef enum { ID_WHEAT, ID_FLOUR } Id; typedef struct { enum { T_METAL, T_COAL, T_AGRI, T_WOOD, T_GLASS, T_ANIMAL, T_OIL, T_TRANSFORMED, T_PAPER, T_ELECTRONIC } type; char name[15]; int amount_per_day; int quality; float price; int time; Id id; Id required[MAT_AMOUNT]; int reqamount; } Item; typedef struct { Id id; Item item; } Itemlist; /*** Production ***/ typedef struct { bool used; int quality; int import; int export; Item materials[MAT_AMOUNT]; } Production; typedef struct { char item[15]; int percent; } Technology; typedef struct { /* Some informations */ char name[16]; int year; /* Political party */ Side g_side; Relation g_relations[REL_AMOUNT]; /* Production */ Production p_agri[PROD_AMOUNT], p_industry[PROD_AMOUNT]; Production p_service[PROD_AMOUNT]; /* Army */ int nuclear; int motivation; int soldiers; Technology technologies[TECHS_AMOUNT]; /* Money */ int inflation; float money; /* Population */ int population_amount; int happyness; int homeless; int unemployed; int happyness_gov; int propaganda_year_investment } Dictatorship; void set_production(Production *production, int quality, int import, int export); void init_dictatorship(Dictatorship *dictatorship, Side side); #endif