]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - mille/extern.c
1 /* $NetBSD: extern.c,v 1.4 1995/03/24 05:01:36 cgd Exp $ */
4 * Copyright (c) 1982, 1993
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 static char sccsid
[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
40 static char rcsid
[] = "$NetBSD: extern.c,v 1.4 1995/03/24 05:01:36 cgd Exp $";
47 * @(#)extern.c 1.1 (Berkeley) 4/1/82
50 bool Debug
, /* set if debugging code on */
51 Finished
, /* set if current hand is finished */
52 Next
, /* set if changing players */
53 On_exit
, /* set if game saved on exiting */
54 Order
, /* set if hand should be sorted */
55 Saved
; /* set if game just saved */
57 char *C_fmt
= "%-18.18s", /* format for printing cards */
58 *Fromfile
= NULL
, /* startup file for game */
59 Initstr
[100], /* initial string for error field */
60 *_cn
[NUM_CARDS
] = { /* Card name buffer */
82 **C_name
= &_cn
[1]; /* Card names */
84 int Card_no
, /* Card number for current move */
85 End
, /* End value for current hand */
86 Handstart
= COMP
, /* Player who starts hand */
87 Movetype
, /* Current move type */
88 Play
, /* Current player */
89 Numgos
, /* Number of Go cards used by computer */
90 Window
= W_SMALL
, /* Current window wanted */
91 Numseen
[NUM_CARDS
], /* Number of cards seen in current hand */
92 Value
[NUM_MILES
] = { /* Value of mileage cards */
95 Numcards
[NUM_CARDS
] = { /* Number of cards in deck */
112 1, /* C_SPARE_SAFE */
113 1, /* C_DRIVE_SAFE */
117 Numneed
[NUM_CARDS
] = { /* number of cards needed per hand */
134 1, /* C_SPARE_SAFE */
135 1, /* C_DRIVE_SAFE */
140 CARD Discard
, /* Top of discard pile */
141 Sh_discard
, /* Last discard card shown */
142 *Topcard
, /* Pointer to next card to be picked */
143 Opposite
[NUM_CARDS
] = { /* Opposites of each card */
144 C_25
, C_50
, C_75
, C_100
, C_200
, C_GAS
, C_SPARE
,
145 C_REPAIRS
, C_GO
, C_END_LIMIT
, C_EMPTY
, C_FLAT
, C_CRASH
,
146 C_STOP
, C_LIMIT
, C_EMPTY
, C_FLAT
, C_CRASH
, C_STOP
, C_INIT
148 Deck
[DECK_SZ
] = { /* Current deck */
149 C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
,
150 C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
,
151 C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
,
152 C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
,
154 C_200
, C_200
, C_200
, C_200
,
158 C_STOP
, C_STOP
, C_STOP
, C_STOP
,
159 C_LIMIT
, C_LIMIT
, C_LIMIT
,
160 C_GAS
, C_GAS
, C_GAS
, C_GAS
, C_GAS
, C_GAS
,
161 C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
,
162 C_REPAIRS
, C_REPAIRS
, C_REPAIRS
, C_REPAIRS
, C_REPAIRS
,
164 C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
,
166 C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
,
167 C_GO
, C_GO
, C_GO
, C_GO
,
168 C_GAS_SAFE
, C_SPARE_SAFE
, C_DRIVE_SAFE
, C_RIGHT_WAY
173 PLAY Player
[2]; /* Player descriptions */
175 WINDOW
*Board
, /* Playing field screen */
176 *Miles
, /* Mileage screen */
177 *Score
; /* Score screen */