Facebook
From Hot Pheasant, 1 Year ago, written in Plain Text.
This paste is a reply to Re: Untitled from Diminutive Echidna - view diff
Embed
Download Paste or View Raw
Hits: 161
  1. struct Monster {
  2.  Object proto;
  3.  int hit_points;
  4. };
  5. typedef struct Monster Monster;
  6. int Monster_attack(void *self, int damage);
  7. int Monster_init(void *self);
  8. struct Room {
  9.  Object proto;
  10.  Monster *bad_guy;
  11.  struct Room *north;
  12.  struct Room *south;
  13.  struct Room *east;
  14.  struct Room *west;
  15. };
  16. typedef struct Room Room;
  17. void *Room_move(void *self, Direction direction);
  18. int Room_attack(void *self, int damage);
  19. int Room_init(void *self);
  20. struct Map {
  21.  Object proto;
  22.  Room *start;
  23.  Room *location;
  24. };
  25. typedef struct Map Map;
  26. void *Map_move(void *self, Direction direction);
  27. int Map_attack(void *self, int damage);
  28. int Map_init(void *self);