box-o-sand/lcthw-remnants/ex19.h
Dan Buch f2380eef05 Add 'lcthw-remnants/' from commit 'e172f73c8297b22a579c94558f0c171ca74a0e5c'
git-subtree-dir: lcthw-remnants
git-subtree-mainline: 4107485591
git-subtree-split: e172f73c82
2013-01-09 23:42:19 -05:00

55 lines
750 B
C

#ifndef _ex19_h
#define _ex19_h
#include "object.h"
struct Monster {
Object proto;
int hit_points;
};
typedef struct Monster Monster;
int Monster_attack(void *self, int damage);
int Monster_init(void *self);
struct Room {
Object proto;
Monster *bad_guy;
struct Room *north;
struct Room *south;
struct Room *east;
struct Room *west;
};
typedef struct Room Room;
void *Room_move(void *self, Direction direction);
int Room_attack(void *self, int damage);
int Room_init(void *self);
struct Map {
Object proto;
Room *start;
Room *location;
};
typedef struct Map Map;
void *Map_move(void *self, Direction direction);
int Map_attack(void *self, int damage);
int Map_init(void *self);
#endif