summaryrefslogtreecommitdiffstats
path: root/games/cribbage/score.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/cribbage/score.c')
-rw-r--r--games/cribbage/score.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/cribbage/score.c b/games/cribbage/score.c
index ecfed9a..073a04a 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);
}
OpenPOWER on IntegriCloud