X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/f12b51f99bbe8bb6ad7eca12b047ba9b46836ee6..107ae55b63501f7ef44616f1625a6d1800e5289d:/hangman/playgame.c diff --git a/hangman/playgame.c b/hangman/playgame.c index 0a7f3d39..f18923d8 100644 --- a/hangman/playgame.c +++ b/hangman/playgame.c @@ -1,4 +1,4 @@ -/* $NetBSD: playgame.c,v 1.5 2003/08/07 09:37:22 agc Exp $ */ +/* $NetBSD: playgame.c,v 1.7 2012/10/13 21:01:13 dholland Exp $ */ /*- * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)playgame.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: playgame.c,v 1.5 2003/08/07 09:37:22 agc Exp $"); +__RCSID("$NetBSD: playgame.c,v 1.7 2012/10/13 21:01:13 dholland Exp $"); #endif #endif /* not lint */ @@ -45,15 +45,15 @@ __RCSID("$NetBSD: playgame.c,v 1.5 2003/08/07 09:37:22 agc Exp $"); * play a game */ void -playgame() +playgame(void) { - bool *bp; + int i; getword(); Errors = 0; - bp = Guessed; - while (bp < &Guessed[26]) - *bp++ = FALSE; + for (i=0; i<26; i++) { + Guessed[i] = false; + } while (Errors < MAXERRS && strchr(Known, '-') != NULL) { prword(); prdata();