xref: /csrg-svn/games/mille/types.c (revision 60812)
130209Sbostic /*
2*60812Sbostic  * Copyright (c) 1982, 1993
3*60812Sbostic  *	The Regents of the University of California.  All rights reserved.
433181Sbostic  *
542579Sbostic  * %sccs.include.redist.c%
630209Sbostic  */
730209Sbostic 
830209Sbostic #ifndef lint
9*60812Sbostic static char sccsid[] = "@(#)types.c	8.1 (Berkeley) 05/31/93";
1033181Sbostic #endif /* not lint */
1130209Sbostic 
1230209Sbostic # include	"mille.h"
1330209Sbostic 
1430209Sbostic /*
1530209Sbostic  * @(#)types.c	1.1 (Berkeley) 4/1/82
1630209Sbostic  */
1730209Sbostic 
isrepair(card)1830209Sbostic isrepair(card)
1930209Sbostic reg CARD	card; {
2030209Sbostic 
2130209Sbostic 	return card == C_GAS || card == C_SPARE || card == C_REPAIRS || card == C_INIT;
2230209Sbostic }
2330209Sbostic 
safety(card)2430209Sbostic safety(card)
2530209Sbostic reg CARD	card; {
2630209Sbostic 
2730209Sbostic 	switch (card) {
2830209Sbostic 	  case C_EMPTY:
2930209Sbostic 	  case C_GAS:
3030209Sbostic 	  case C_GAS_SAFE:
3130209Sbostic 		return C_GAS_SAFE;
3230209Sbostic 	  case C_FLAT:
3330209Sbostic 	  case C_SPARE:
3430209Sbostic 	  case C_SPARE_SAFE:
3530209Sbostic 		return C_SPARE_SAFE;
3630209Sbostic 	  case C_CRASH:
3730209Sbostic 	  case C_REPAIRS:
3830209Sbostic 	  case C_DRIVE_SAFE:
3930209Sbostic 		return C_DRIVE_SAFE;
4030209Sbostic 	  case C_GO:
4130209Sbostic 	  case C_STOP:
4230209Sbostic 	  case C_RIGHT_WAY:
4330209Sbostic 	  case C_LIMIT:
4430209Sbostic 	  case C_END_LIMIT:
4530209Sbostic 		return C_RIGHT_WAY;
4630209Sbostic 	}
4730209Sbostic 	/* NOTREACHED */
4830209Sbostic }
4930209Sbostic 
50