]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - mille/extern.c
1 /* $NetBSD: extern.c,v 1.6 1999/09/08 21:17:50 jsm 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
36 #include <sys/cdefs.h>
39 static char sccsid
[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
41 __RCSID("$NetBSD: extern.c,v 1.6 1999/09/08 21:17:50 jsm Exp $");
48 * @(#)extern.c 1.1 (Berkeley) 4/1/82
51 bool Debug
, /* set if debugging code on */
52 Finished
, /* set if current hand is finished */
53 Next
, /* set if changing players */
54 On_exit
, /* set if game saved on exiting */
55 Order
, /* set if hand should be sorted */
56 Saved
; /* set if game just saved */
58 char Initstr
[100]; /* initial string for error field */
59 const char *C_fmt
= "%-18.18s", /* format for printing cards */
60 *Fromfile
= NULL
, /* startup file for game */
61 *const _cn
[NUM_CARDS
] = { /* Card name buffer */
83 *const *C_name
= &_cn
[1]; /* Card names */
85 int Card_no
, /* Card number for current move */
86 End
, /* End value for current hand */
87 Handstart
= COMP
, /* Player who starts hand */
88 Movetype
, /* Current move type */
89 Play
, /* Current player */
90 Numgos
, /* Number of Go cards used by computer */
91 Window
= W_SMALL
, /* Current window wanted */
92 Numseen
[NUM_CARDS
]; /* Number of cards seen in current hand */
93 const int Value
[NUM_MILES
] = { /* Value of mileage cards */
96 Numcards
[NUM_CARDS
] = { /* Number of cards in deck */
113 1, /* C_SPARE_SAFE */
114 1, /* C_DRIVE_SAFE */
118 int Numneed
[NUM_CARDS
] = { /* number of cards needed per hand */
135 1, /* C_SPARE_SAFE */
136 1, /* C_DRIVE_SAFE */
141 CARD Discard
, /* Top of discard pile */
142 Sh_discard
, /* Last discard card shown */
143 *Topcard
; /* Pointer to next card to be picked */
144 const CARD Opposite
[NUM_CARDS
] = { /* Opposites of each card */
145 C_25
, C_50
, C_75
, C_100
, C_200
, C_GAS
, C_SPARE
,
146 C_REPAIRS
, C_GO
, C_END_LIMIT
, C_EMPTY
, C_FLAT
, C_CRASH
,
147 C_STOP
, C_LIMIT
, C_EMPTY
, C_FLAT
, C_CRASH
, C_STOP
, C_INIT
149 CARD Deck
[DECK_SZ
] = { /* Current deck */
150 C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
, C_25
,
151 C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
, C_50
,
152 C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
, C_75
,
153 C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
, C_100
,
155 C_200
, C_200
, C_200
, C_200
,
159 C_STOP
, C_STOP
, C_STOP
, C_STOP
,
160 C_LIMIT
, C_LIMIT
, C_LIMIT
,
161 C_GAS
, C_GAS
, C_GAS
, C_GAS
, C_GAS
, C_GAS
,
162 C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
, C_SPARE
,
163 C_REPAIRS
, C_REPAIRS
, C_REPAIRS
, C_REPAIRS
, C_REPAIRS
,
165 C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
, C_END_LIMIT
,
167 C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
, C_GO
,
168 C_GO
, C_GO
, C_GO
, C_GO
,
169 C_GAS_SAFE
, C_SPARE_SAFE
, C_DRIVE_SAFE
, C_RIGHT_WAY
174 PLAY Player
[2]; /* Player descriptions */
176 WINDOW
*Board
, /* Playing field screen */
177 *Miles
, /* Mileage screen */
178 *Score
; /* Score screen */