diff options
Diffstat (limited to 'cribbage')
-rw-r--r-- | cribbage/crib.c | 7 | ||||
-rw-r--r-- | cribbage/score.c | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/cribbage/crib.c b/cribbage/crib.c index ce8778f4..e7d9ce3d 100644 --- a/cribbage/crib.c +++ b/cribbage/crib.c @@ -1,4 +1,4 @@ -/* $NetBSD: crib.c,v 1.9 1997/10/11 02:44:30 lukem Exp $ */ +/* $NetBSD: crib.c,v 1.10 1998/08/30 09:19:37 veego Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)crib.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: crib.c,v 1.9 1997/10/11 02:44:30 lukem Exp $"); +__RCSID("$NetBSD: crib.c,v 1.10 1998/08/30 09:19:37 veego Exp $"); #endif #endif /* not lint */ @@ -582,7 +582,7 @@ peg(mycrib) prhand(ph, pnum, Playwin, FALSE); prhand(ch, cnum, Compwin, TRUE); prtable(sum); - if (last) + if (last) { if (played) { msg(quiet ? "I get one for last" : "I get one point for last"); @@ -596,6 +596,7 @@ peg(mycrib) if (chkscr(&pscore, 1)) return TRUE; } + } return (FALSE); } diff --git a/cribbage/score.c b/cribbage/score.c index d0ae050d..69c38a7f 100644 --- a/cribbage/score.c +++ b/cribbage/score.c @@ -1,4 +1,4 @@ -/* $NetBSD: score.c,v 1.5 1997/10/10 12:32:34 lukem Exp $ */ +/* $NetBSD: score.c,v 1.6 1998/08/30 09:19:37 veego Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: score.c,v 1.5 1997/10/10 12:32:34 lukem Exp $"); +__RCSID("$NetBSD: score.c,v 1.6 1998/08/30 09:19:37 veego Exp $"); #endif #endif /* not lint */ @@ -159,21 +159,23 @@ scorehand(hand, starter, n, crb, do_explain) sorthand(h, n + 1); /* sort by rank */ i = 2 * fifteens(h, n + 1); score += i; - if (do_explain) + if (do_explain) { if (i > 0) { (void) sprintf(buf, "%d points in fifteens", i); strcat(expl, buf); } else strcat(expl, "No fifteens"); + } i = pairuns(h, n + 1); score += i; - if (do_explain) + if (do_explain) { if (i > 0) { (void) sprintf(buf, ", %d points in pairs, %d in runs", pairpoints, runpoints); strcat(expl, buf); } else strcat(expl, ", No pairs/runs"); + } return (score); } |