diff --git a/game.h b/game.h index af058a2bc6f2b2bdeb14032dbe19c0e029a5ddcb..2ffd43bdad08a6757f0707ba6e53f4f0977930d4 100644 --- a/game.h +++ b/game.h @@ -1,11 +1,13 @@ #ifndef GAME_H #define GAME_H - #include "mobile.h" +#include "stack.h" -typedef struct +struct Stack; +typedef struct Game { Mobile *player; + struct Stack *locationStack; } Game; extern Game *GameInit(); diff --git a/location.h b/location.h index d2706f908f6b462554668ef52cfc21d0bc418cb9..3bfe9cf524e74a4ee45a1032f99a0200a4bdeaf3 100644 --- a/location.h +++ b/location.h @@ -3,16 +3,20 @@ #include "exits.h" #include "stack.h" +struct Game; typedef struct Location { char *name; char *desc; + int index; struct Location *directions[6]; } Location; +Location *LocationInit(struct Game *game); + extern Location *LocationNew(char *name, char *desc); extern Location *LocationDelete(Location *m); extern void LocationPrint(Location *m); extern Location *LocationInit(); extern void LocationSetExit(Location *l1, Direction direction, Location *l2); -#endif // LOCATION_H \ No newline at end of file +#endif // LOCATION_H diff --git a/stack.h b/stack.h index bfca2f76d1c25b8b8770268737d70deddabcebe5..55ba77f45973e9ee28e789227dbe25f16d50063a 100644 --- a/stack.h +++ b/stack.h @@ -3,8 +3,9 @@ #include "Location.h" +struct Location; typedef struct Stack { Location* location; struct Stack* next; -}Stack; +}Stack; \ No newline at end of file