diff options
| author | Bill Fumerola <billf@FreeBSD.org> | 1999-09-07 06:00:03 +0000 |
|---|---|---|
| committer | Bill Fumerola <billf@FreeBSD.org> | 1999-09-07 06:00:03 +0000 |
| commit | c057c9b64120a40a00d87bbf86ea5049a3af7890 (patch) | |
| tree | a1d7405b968033249056ac9da42e297180f40695 /games/cribbage | |
| parent | 5843a8f56f42139db4543a3cecf9b48af8bf7d9a (diff) | |
Notes
Diffstat (limited to 'games/cribbage')
| -rw-r--r-- | games/cribbage/crib.c | 3 | ||||
| -rw-r--r-- | games/cribbage/score.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/games/cribbage/crib.c b/games/cribbage/crib.c index 22dddbafb13f..16550534cf24 100644 --- a/games/cribbage/crib.c +++ b/games/cribbage/crib.c @@ -570,7 +570,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"); @@ -583,6 +583,7 @@ peg(mycrib) if (chkscr(&pscore, 1)) return TRUE; } + } return (FALSE); } diff --git a/games/cribbage/score.c b/games/cribbage/score.c index ecfed9ac9325..073a04afddf2 100644 --- a/games/cribbage/score.c +++ b/games/cribbage/score.c @@ -152,21 +152,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); } |
