summaryrefslogtreecommitdiffstats
path: root/games/boggle
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2009-05-21 12:57:31 +0000
committerschwarze <schwarze@openbsd.org>2009-05-21 12:57:31 +0000
commit54f184b3084d285c302c060c4428430779c6fb7f (patch)
treebe52620de12247f0fc0b11f206f0f8d931655ea9 /games/boggle
parentAdd ForwardVideo EasyCAP008. -moj (diff)
downloadwireguard-openbsd-54f184b3084d285c302c060c4428430779c6fb7f.tar.xz
wireguard-openbsd-54f184b3084d285c302c060c4428430779c6fb7f.zip
correct number of total words on the "Score:" line
from Graeme Lee <graeme at omni dot net dot au> on tech@, tweaked by me while here, actually use the variables denom[12] defined a few lines above OK millert@
Diffstat (limited to 'games/boggle')
-rw-r--r--games/boggle/boggle/mach.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/games/boggle/boggle/mach.c b/games/boggle/boggle/mach.c
index ebde78434d5..be166c58d97 100644
--- a/games/boggle/boggle/mach.c
+++ b/games/boggle/boggle/mach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mach.c,v 1.10 2008/03/26 20:12:59 millert Exp $ */
+/* $OpenBSD: mach.c,v 1.11 2009/05/21 12:57:31 schwarze Exp $ */
/* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */
/*-
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
-static char rcsid[] = "$OpenBSD: mach.c,v 1.10 2008/03/26 20:12:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: mach.c,v 1.11 2009/05/21 12:57:31 schwarze Exp $";
#endif
#endif /* not lint */
@@ -174,11 +174,11 @@ results(void)
denom2 = tnpwords + tnmwords;
move(SCORE_LINE, SCORE_COL);
- printw("Score: %d out of %d\n", npwords, nmwords);
+ printw("Score: %d out of %d\n", npwords, denom1);
move(SCORE_LINE + 1, SCORE_COL);
printw("Percentage: %0.2f%% (%0.2f%% over %d game%s)\n",
- denom1 ? (100.0 * npwords) / (double) (npwords + nmwords) : 0.0,
- denom2 ? (100.0 * tnpwords) / (double) (tnpwords + tnmwords) : 0.0,
+ denom1 ? (100.0 * npwords) / (double) denom1 : 0.0,
+ denom2 ? (100.0 * tnpwords) / (double) denom2 : 0.0,
ngames, ngames > 1 ? "s" : "");
move(TIMER_LINE, TIMER_COL);
wclrtoeol(stdscr);