home *** CD-ROM | disk | FTP | other *** search
- /*
- ** townmain.c Copyright 1991 Kent Paul Dolan,
- ** Mountain View, CA, USA 94039-0755
- **
- ** Written to satisfy an inquiry on USENet's rec.games.programmer newsgroup.
- ** May be freely used or modified in any non-commercial work. Copyrighted
- ** only to prevent patenting by someone else.
- */
-
- #include <stdio.h>
- #define MAINLINE 1
- #include "townmaze.h"
- #include "townproto.h"
-
- #ifdef __STDC__
- void main(int argc,char *argv[])
- #else
- int main(argc,argv)
- int argc;
- char *argv[];
- #endif
- {
-
- SEEDRANDOM(randomseed = time(0));
- getargs(argc,argv);
- makespace();
- fillmaze();
- filllist();
- makeunused();
- makegates();
- makecourts();
- #if SHOWSTART
- showdebugmaze();
- #endif
- connectstreets();
- finishalleys();
- closedoors();
- closegates();
- cleanupmap();
- /*
- #if PROGRESS
- fprintf(stderr,"\n");
- #endif
- showlistsummary();
- showlistdetail();
- */
- #if SHOWEND
- #if PROGRESS
- fprintf(stderr,"\n");
- #endif
- showdebugmaze();
- #endif
- showmaze();
- freespace();
- /*
- */
- exit(0);
- }
-