Re: [DM-dev] Make it more modular
Brought to you by:
acdalton,
henningsen
From: Henningsen <pe...@al...> - 2001-04-01 14:13:20
|
>So, since you want suggestions, I suggest that you take the main() function >out into its own separate file. Very sensible. How could I overlook that. >Also, in your interface: In the DungeonMaker >constructor, you call several variables that are read in from the >rooms-file. Isn't that redundant? Shouldn't the constructor read the >rooms-file itself, so you could get rid of the variables in the constructor? >Makes it easier to call, and all... Yeah, but if the file is missing, the constructor call would fail, and that would be a problem, since I cannot return an error code from the constructor. So I thought it best to let the user deal with that, writing his own error handling. Have you tried to design your own dungeons? And where are you anyway? Haven't heard from you in a long time. Peter |