Newer
Older
generate_dungeon.c: generates a dungeon map or loads one from file, and
optionally saves it to the file
Generates a random dungeon and displays it as specified in assignment 1.01.
If --load is specified, the dungeon is loaded from disk instead. If --save
is specified, the dungeon is then written to the disk.
The dungeon, including player position, is all contained in a single struct.
I slightly modified my logic to work on the data format of the file.
This makes interchanging random generation, load, and save relatively
straightforward, and simplifies many of the functions because now only
a single parameter, a reference to the dungeon struct, is being passed.