diff --git a/src/main.c b/src/main.c index 807a785d506244c3638001cf855a8ca5adc6b19a..3754dd5a06cc050dd80663366663c5c9438d72ce 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include "structures.h" int main() { @@ -7,4 +8,3 @@ int main() return 0; } -/*test*/ diff --git a/src/structures.h b/src/structures.h new file mode 100644 index 0000000000000000000000000000000000000000..d148843d13cb1d9a2d673466ec6477f92ce70a08 --- /dev/null +++ b/src/structures.h @@ -0,0 +1,40 @@ +#ifndef STRUCTURES_H_INCLUDED +#define STRUCTURES_H_INCLUDED + +/* definition des structures nécessaires : case, classe, etc */ + +typedef enum {plaine,eau,montagne,foret} type_terrain; + +typedef enum {faux, vrai} boolean; + +typedef struct { + unsigned short int coord_x; + unsigned short int coord_y; + type_terrain terrain; + boolean occupee; +} Case; + +typedef struct { + char nom[16]; + unsigned short int degats_directs; + unsigned short int degats_permanents; + boolean paralysie; +} attaque; + +typedef struct { + char nom[16]; + attaque attaque; + unsigned short int points_deplacement_max; + unsigned short int PV_max; +} classe; + +typedef struct { + char nom[16]; + classe classe; + unsigned short int points_deplacement; + unsigned short int PV; + boolean paralyse; + Case position; +} personnage; + +#endif