4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / games / hangman / main.c
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* %sccs.include.redist.c%
*/
#ifndef lint
static char copyright[] =
"@(#) Copyright (c) 1983, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) %G%";
#endif /* not lint */
# include "hangman.h"
/*
* This game written by Ken Arnold.
*/
main()
{
void die();
initscr();
signal(SIGINT, die);
setup();
for (;;) {
Wordnum++;
playgame();
Average = (Average * (Wordnum - 1) + Errors) / Wordnum;
}
/* NOTREACHED */
}
/*
* die:
* Die properly.
*/
void
die()
{
mvcur(0, COLS - 1, LINES - 1, 0);
endwin();
putchar('\n');
exit(0);
}