CARD
cremove(CARD a, CARD d[], int n)
sorthand(CARD h[], int n)
CARD *cp, *endp;
CARD c;
makedeck(CARD d[])
shuffle(CARD d[])
CARD c;
eq(CARD a, CARD b)
isone(CARD a, CARD b[], int n)
CARD crd;
static CARD Table[14];
static CARD ch[CINHAND], ph[CINHAND];
CARD crd;
extern CARD deck[ CARDS ]; /* a deck */
extern CARD phand[ FULLHAND ]; /* player's hand */
extern CARD chand[ FULLHAND ]; /* computer's hand */
extern CARD crib[ CINHAND ]; /* the crib */
extern CARD turnover; /* the starter */
extern CARD known[ CARDS ]; /* cards we have seen */
int adjust(CARD []);
bool anymove(CARD [], int, int);
int cchose(CARD [], int, int);
bool comphand(CARD [], const char *);
void cremove(CARD, CARD [], int);
int infrom(CARD [], int, const char *);
bool isone(CARD, CARD [], int);
void makedeck(CARD []);
void makeknown(CARD [], int);
bool msgcard(CARD, bool);
int pegscore(CARD, CARD [], int, int);
bool plyrhand(CARD [], const char *);
void prcard(WINDOW *, int, int, CARD, bool);
void prhand(CARD [], int, WINDOW *, bool);
int scorehand(CARD [], CARD, int, bool, bool);
void shuffle(CARD []);
void sorthand(CARD [], int);
CARD chand[FULLHAND]; /* computer's hand */
CARD crib[CINHAND]; /* the crib */
CARD deck[CARDS]; /* a deck */
CARD known[CARDS]; /* cards we have seen */
CARD phand[FULLHAND]; /* player's hand */
CARD turnover; /* the starter */
printcard(WINDOW *win, int cardno, CARD c, bool blank)
prcard(WINDOW *win, int y, int x, CARD c, bool blank)
prhand(CARD h[], int n, WINDOW *win, bool blank)
infrom(CARD hand[], int n, const char *prompt)
CARD crd;
incard(CARD *crd)
static bool incard(CARD *);
static bool msgcrd(CARD, bool, const char *, bool);
static void printcard(WINDOW *, int, CARD, bool);
msgcard(CARD c, bool brief)
msgcrd(CARD c, bool brfrank, const char *mid, bool brfsuit)
scorehand(CARD hand[], CARD starter, int n, bool crb, bool do_explain)
CARD h[(CINHAND + 1)];
fifteens(CARD hand[], int n)
CARD *endp;
pairuns(CARD h[], int n)
pegscore(CARD crd, CARD tbl[], int n, int sum)
adjust(CARD cb[])
static int fifteens(CARD[], int);
static int pairuns(CARD[], int);
plyrhand(CARD hand[], const char *s)
comphand(CARD h[], const char *s)
CARD d[CARDS], h[FULLHAND], cb[2];
anymove(CARD hand[], int n, int sum)
anysumto(CARD hand[], int n, int s, int t)
numofval(CARD h[], int n, int v)
makeknown(CARD h[], int n)
static int anysumto(CARD[], int, int, int);
static int numofval(CARD[], int, int);
cchose(CARD h[], int n, int s)
CARD bat, spd, card;
canplay(const PLAY *pp, const PLAY *op, CARD card)
CARD card;
CARD safe, oppos;
CARD Discard, /* Top of discard pile */
const CARD Opposite[NUM_CARDS] = { /* Opposites of each card */
CARD Deck[DECK_SZ] = { /* Current deck */
CARD card;
CARD temp;
CARD hand[HAND_SZ];
CARD sh_hand[HAND_SZ];
CARD battle;
CARD sh_battle;
CARD speed;
CARD sh_speed;
extern CARD Deck[DECK_SZ], Discard, Sh_discard, *Topcard;
extern const CARD Opposite[NUM_CARDS];
void account(CARD);
bool canplay(const PLAY *, const PLAY *, CARD);
CARD getcard(void);
int isrepair(CARD);
CARD safety(CARD);
void sort(CARD *);
CARD
CARD card;
CARD card;
account(CARD card)
CARD oppos;
sort(CARD *hand)
CARD *cp, *tp;
CARD temp;
show_card(int y, int x, CARD c, CARD *lc)
static void show_card(int, int, CARD, CARD *);
isrepair(CARD card)
CARD
safety(CARD card)