copy in from cvs; cvs2svn fucked up big time

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2003-12-19 19:12:08 +00:00
parent 351c8ca204
commit 51eabc017b
310 changed files with 7852 additions and 5005 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: score.c,v 1.6 1998/08/30 09:19:37 veego Exp $ */
/* $NetBSD: score.c,v 1.9 2002/12/06 01:48:24 thorpej 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.6 1998/08/30 09:19:37 veego Exp $");
__RCSID("$NetBSD: score.c,v 1.9 2002/12/06 01:48:24 thorpej Exp $");
#endif
#endif /* not lint */
@@ -122,7 +122,7 @@ scorehand(hand, starter, n, crb, do_explain)
CARD h[(CINHAND + 1)];
char buf[32];
expl[0] = '\0'; /* initialize explanation */
explan[0] = '\0'; /* initialize explanation */
score = 0;
flag = TRUE;
k = hand[0].suit;
@@ -132,29 +132,29 @@ scorehand(hand, starter, n, crb, do_explain)
if (hand[i].suit == starter.suit) {
score++;
if (do_explain)
strcat(expl, "His Nobs");
strcat(explan, "His Nobs");
}
h[i] = hand[i];
}
if (flag && n >= CINHAND) {
if (do_explain && expl[0] != '\0')
strcat(expl, ", ");
if (do_explain && explan[0] != '\0')
strcat(explan, ", ");
if (starter.suit == k) {
score += 5;
if (do_explain)
strcat(expl, "Five-flush");
strcat(explan, "Five-flush");
} else
if (!crb) {
score += 4;
if (do_explain && expl[0] != '\0')
strcat(expl, ", Four-flush");
if (do_explain && explan[0] != '\0')
strcat(explan, ", Four-flush");
else
strcpy(expl, "Four-flush");
strcpy(explan, "Four-flush");
}
}
if (do_explain && expl[0] != '\0')
strcat(expl, ", ");
if (do_explain && explan[0] != '\0')
strcat(explan, ", ");
h[n] = starter;
sorthand(h, n + 1); /* sort by rank */
i = 2 * fifteens(h, n + 1);
@@ -162,9 +162,9 @@ scorehand(hand, starter, n, crb, do_explain)
if (do_explain) {
if (i > 0) {
(void) sprintf(buf, "%d points in fifteens", i);
strcat(expl, buf);
strcat(explan, buf);
} else
strcat(expl, "No fifteens");
strcat(explan, "No fifteens");
}
i = pairuns(h, n + 1);
score += i;
@@ -172,9 +172,9 @@ scorehand(hand, starter, n, crb, do_explain)
if (i > 0) {
(void) sprintf(buf, ", %d points in pairs, %d in runs",
pairpoints, runpoints);
strcat(expl, buf);
strcat(explan, buf);
} else
strcat(expl, ", No pairs/runs");
strcat(explan, ", No pairs/runs");
}
return (score);
}
@@ -354,7 +354,7 @@ pegscore(crd, tbl, n, sum)
int
adjust(cb, tnv)
const CARD cb[];
CARD tnv __attribute__((unused));
CARD tnv __attribute__((__unused__));
{
long scr;
int i, c0, c1;