Berkeley header
[unix-history] / usr / src / games / mille / types.c
CommitLineData
8aa0e21b
KB
1/*
2 * Copyright (c) 1982 Regents of the University of California.
d6bad537
KB
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
8aa0e21b
KB
11 */
12
13#ifndef lint
d6bad537
KB
14static char sccsid[] = "@(#)types.c 5.2 (Berkeley) %G%";
15#endif /* not lint */
16
8aa0e21b
KB
17
18# include "mille.h"
19
20/*
21 * @(#)types.c 1.1 (Berkeley) 4/1/82
22 */
23
24isrepair(card)
25reg CARD card; {
26
27 return card == C_GAS || card == C_SPARE || card == C_REPAIRS || card == C_INIT;
28}
29
30safety(card)
31reg CARD card; {
32
33 switch (card) {
34 case C_EMPTY:
35 case C_GAS:
36 case C_GAS_SAFE:
37 return C_GAS_SAFE;
38 case C_FLAT:
39 case C_SPARE:
40 case C_SPARE_SAFE:
41 return C_SPARE_SAFE;
42 case C_CRASH:
43 case C_REPAIRS:
44 case C_DRIVE_SAFE:
45 return C_DRIVE_SAFE;
46 case C_GO:
47 case C_STOP:
48 case C_RIGHT_WAY:
49 case C_LIMIT:
50 case C_END_LIMIT:
51 return C_RIGHT_WAY;
52 }
53 /* NOTREACHED */
54}
55