1 /*- 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)playgame.c 8.1 (Berkeley) 05/31/93"; 10 #endif /* not lint */ 11 12 # include "hangman.h" 13 14 /* 15 * playgame: 16 * play a game 17 */ playgame()18playgame() 19 { 20 register bool *bp; 21 22 getword(); 23 Errors = 0; 24 bp = Guessed; 25 while (bp < &Guessed[26]) 26 *bp++ = FALSE; 27 while (Errors < MAXERRS && index(Known, '-') != NULL) { 28 prword(); 29 prdata(); 30 prman(); 31 getguess(); 32 } 33 endgame(); 34 } 35