1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 */ 17 18 #ifndef lint 19 static char sccsid[] = "@(#)extern.c 5.3 (Berkeley) 06/18/88"; 20 #endif /* not lint */ 21 22 # include <curses.h> 23 # include "deck.h" 24 # include "cribbage.h" 25 26 bool explain = FALSE; /* player mistakes explained */ 27 bool iwon = FALSE; /* if comp won last game */ 28 bool quiet = FALSE; /* if suppress random mess */ 29 bool rflag = FALSE; /* if all cuts random */ 30 31 char expl[128]; /* explanation */ 32 33 int cgames = 0; /* number games comp won */ 34 int cscore = 0; /* comp score in this game */ 35 int gamecount = 0; /* number games played */ 36 int glimit = LGAME; /* game playe to glimit */ 37 int knownum = 0; /* number of cards we know */ 38 int pgames = 0; /* number games player won */ 39 int pscore = 0; /* player score in this game */ 40 41 CARD chand[FULLHAND]; /* computer's hand */ 42 CARD crib[CINHAND]; /* the crib */ 43 CARD deck[CARDS]; /* a deck */ 44 CARD known[CARDS]; /* cards we have seen */ 45 CARD phand[FULLHAND]; /* player's hand */ 46 CARD turnover; /* the starter */ 47 48 WINDOW *Compwin; /* computer's hand window */ 49 WINDOW *Msgwin; /* messages for the player */ 50 WINDOW *Playwin; /* player's hand window */ 51 WINDOW *Tablewin; /* table window */ 52