{{{#include #include #include #define NUM 4 typedef struct z{ int gong; int bang; int hp; int name; }unit; void attack(unit a, unit &b) { if(b.hp<=0 || a.hp<=0) return; b.hp -=a.gong; printf("저글링 %d이 저글링 %d에게 데미지 %d를 입혀 HP가 %d가 되었다.\n", a.name, b.name, a.gong, b.hp); if(b.hp==0) printf("저글링 %d이 전사했습니다.\n", b.name); } void init_unit(unit a[NUM]){ int n; for(n=0 ; n