#include <stdio.h>
#include <string.h>
#include <stdlib.h>


typedef struct monster_{
  int health;
  int power;
  int x_pos;
  int y_pos;
} monster;

void print_struct(monster *monster1)
{
  printf("%d\n", monster1->health);
  printf("%d\n", monster1->power);
  printf("%d\n", monster1->x_pos);
  printf("%d\n", monster1->y_pos);
}

monster new_monster(monster *m)
{
  m = malloc(sizeof(monster));
  return m;
}

void init_monster(monster *m)
{

  m->health = 100;
  m->power = 100;
  m->x_pos = 35;
  m->y_pos = 100;
}

int main () {
  monster monster1;

  monster1.health = 90;
  monster1.power = 12;
  monster1.x_pos = 23;
  monster1.y_pos = 65;

  monster *m;
  m = new_monster(m);
  init_monster(m);
  
  print_struct(m);

  return 0;
 
}
