diff options
author | billf <billf@FreeBSD.org> | 1999-09-07 06:00:03 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-09-07 06:00:03 +0000 |
commit | 3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 (patch) | |
tree | a392a79dd376bd7e8273e85fac9e7af604437b66 /games/cribbage/score.c | |
parent | 33adb981d4021526b69c31fe25c2fc524378289f (diff) | |
download | FreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.zip FreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.tar.gz |
Avoid ambigious if() if() else().
Diffstat (limited to 'games/cribbage/score.c')
-rw-r--r-- | games/cribbage/score.c | 6 |
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); } |