From 3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 Mon Sep 17 00:00:00 2001 From: billf Date: Tue, 7 Sep 1999 06:00:03 +0000 Subject: Avoid ambigious if() if() else(). --- games/cribbage/score.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'games/cribbage/score.c') 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); } -- cgit v1.1