document conditions wherein ruserok will fail
[unix-history] / usr / src / games / rogue / main.c
CommitLineData
b3afadef
KB
1/*
2 * main.c
3 *
4 * This source herein may be modified and/or distributed by anybody who
5 * so desires, with the following restrictions:
6 * 1.) No portion of this notice shall be removed.
7 * 2.) Credit shall not be taken for the creation of this source.
8 * 3.) This code is not to be traded, sold, or used for personal
9 * gain or profit.
10 *
11 */
12
13#ifndef lint
14static char sccsid[] = "@(#)main.c 5.1 (Berkeley) %G%";
15#endif /* not lint */
16
17#include "rogue.h"
18
19extern short party_room;
20
21main(argc, argv)
22int argc;
23char *argv[];
24{
25 if (init(argc, argv)) { /* restored game */
26 goto PL;
27 }
28
29 for (;;) {
30 clear_level();
31 make_level();
32 put_objects();
33 put_stairs();
34 add_traps();
35 put_mons();
36 put_player(party_room);
37 print_stats(STAT_ALL);
38PL:
39 play_level();
40 free_stuff(&level_objects);
41 free_stuff(&level_monsters);
42 }
43}