Just a brief question about general roguelike coding. I've been writing my own roguelike, and I've had to pass lots of parameters to each function;
int player_move(struct player_t *player, struct map_t *map, TCOD_list_t *other actors, dx, dy);
I was wondering if it's a good idea to simply combine all the game variables into a single data structure;
int player_move(struct game_t *game, dx, dy);
to cut down the number of parameters passed to each function.
I'm using C, not C++, so OOP stuff doesn't really apply here.
Are there other ways of managing this?
Should I be declaring the game data as a global variable instead?
On a completely unrelated note, a question for all you C coding experts
should I use
struct abc {};
or
typedef struct {} abc;
for structures
Thanks in advance for the help!