This commit is contained in:
2026-02-11 13:20:47 +01:00
commit d3645f663c
30 changed files with 403 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "weapons.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
struct gun *init_gun(char name[50], int damage, enum distance range, int magazine_size){
struct gun *rslt = malloc(sizeof( struct gun));
//mettre protection
//init des var du struct
strcpy(rslt->name, name);
rslt->damage = damage;
rslt->range = range;
rslt->magazine_size = magazine_size;
return rslt;
}