2 * Copyright (c) 1982, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * @(#)extern.c 8.1 (Berkeley) 5/31/93
30 * $FreeBSD: src/games/mille/extern.c,v 1.3 1999/11/30 03:49:01 billf Exp $
36 * @(#)extern.c 1.1 (Berkeley) 4/1/82
39 bool Debug, /* set if debugging code on */
40 Finished, /* set if current hand is finished */
41 Next, /* set if changing players */
42 On_exit, /* set if game saved on exiting */
43 Order, /* set if hand should be sorted */
44 Saved; /* set if game just saved */
46 char Initstr[100]; /* initial string for error field */
47 const char *C_fmt = "%-18.18s"; /* format for printing cards */
48 const char *Fromfile = NULL; /* startup file for game */
49 static const char *const _cn[NUM_CARDS] = { /* Card name buffer */
71 const char *const *C_name = &_cn[1]; /* Card names */
73 int Card_no, /* Card number for current move */
74 End, /* End value for current hand */
75 Handstart = COMP, /* Player who starts hand */
76 Movetype, /* Current move type */
77 Play, /* Current player */
78 Numgos, /* Number of Go cards used by computer */
79 Window = W_SMALL, /* Current window wanted */
80 Numseen[NUM_CARDS]; /* Number of cards seen in current hand */
82 const int Value[NUM_MILES] = { /* Value of mileage cards */
85 Numcards[NUM_CARDS] = { /* Number of cards in deck */
102 1, /* C_SPARE_SAFE */
103 1, /* C_DRIVE_SAFE */
107 int Numneed[NUM_CARDS] = { /* number of cards needed per hand */
124 1, /* C_SPARE_SAFE */
125 1, /* C_DRIVE_SAFE */
130 CARD Discard, /* Top of discard pile */
131 Sh_discard, /* Last discard card shown */
132 *Topcard; /* Pointer to next card to be picked */
133 const CARD Opposite[NUM_CARDS] = { /* Opposites of each card */
134 C_25, C_50, C_75, C_100, C_200, C_GAS, C_SPARE,
135 C_REPAIRS, C_GO, C_END_LIMIT, C_EMPTY, C_FLAT, C_CRASH,
136 C_STOP, C_LIMIT, C_EMPTY, C_FLAT, C_CRASH, C_STOP, C_INIT
138 CARD Deck[DECK_SZ] = { /* Current deck */
139 C_25, C_25, C_25, C_25, C_25, C_25, C_25, C_25, C_25, C_25,
140 C_50, C_50, C_50, C_50, C_50, C_50, C_50, C_50, C_50, C_50,
141 C_75, C_75, C_75, C_75, C_75, C_75, C_75, C_75, C_75, C_75,
142 C_100, C_100, C_100, C_100, C_100, C_100, C_100, C_100, C_100,
144 C_200, C_200, C_200, C_200,
148 C_STOP, C_STOP, C_STOP, C_STOP,
149 C_LIMIT, C_LIMIT, C_LIMIT,
150 C_GAS, C_GAS, C_GAS, C_GAS, C_GAS, C_GAS,
151 C_SPARE, C_SPARE, C_SPARE, C_SPARE, C_SPARE, C_SPARE,
152 C_REPAIRS, C_REPAIRS, C_REPAIRS, C_REPAIRS, C_REPAIRS,
154 C_END_LIMIT, C_END_LIMIT, C_END_LIMIT, C_END_LIMIT, C_END_LIMIT,
156 C_GO, C_GO, C_GO, C_GO, C_GO, C_GO, C_GO, C_GO, C_GO, C_GO,
157 C_GO, C_GO, C_GO, C_GO,
158 C_GAS_SAFE, C_SPARE_SAFE, C_DRIVE_SAFE, C_RIGHT_WAY
163 PLAY Player[2]; /* Player descriptions */
165 WINDOW *Board, /* Playing field screen */
166 *Miles, /* Mileage screen */
167 *Score; /* Score screen */