1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)deck.h	5.1 (Berkeley) 5/30/85
   7:  */
   8: 
   9: /*
  10:  * define structure of a deck of cards and other related things
  11:  */
  12: 
  13: 
  14: #define     CARDS       52      /* number cards in deck */
  15: #define     RANKS       13      /* number ranks in deck */
  16: #define     SUITS       4       /* number suits in deck */
  17: 
  18: #define     CINHAND     4       /* # cards in cribbage hand */
  19: #define     FULLHAND    6       /* # cards in dealt hand */
  20: 
  21: #define     LGAME       121     /* number points in a game */
  22: #define     SGAME       61      /* # points in a short game */
  23: 
  24: #define     SPADES      0       /* value of each suit */
  25: #define     HEARTS      1
  26: #define     DIAMONDS    2
  27: #define     CLUBS       3
  28: 
  29: #define     ACE     0       /* value of each rank */
  30: #define     TWO     1
  31: #define     THREE       2
  32: #define     FOUR        3
  33: #define     FIVE        4
  34: #define     SIX     5
  35: #define     SEVEN       6
  36: #define     EIGHT       7
  37: #define     NINE        8
  38: #define     TEN     9
  39: #define     JACK        10
  40: #define     QUEEN       11
  41: #define     KING        12
  42: #define     EMPTY       13
  43: 
  44: #define     VAL(c)      ( (c) < 9 ? (c)+1 : 10 )    /* val of rank */
  45: 
  46: 
  47: #ifndef TRUE
  48: #	define        TRUE        1
  49: #	define        FALSE       0
  50: #endif
  51: 
  52: typedef     struct  {
  53:             int     rank;
  54:             int     suit;
  55:         }       CARD;
  56: 
  57: typedef     char        BOOLEAN;

Defined typedef's

Defined macros

ACE defined in line 29; never used
CLUBS defined in line 27; never used
DIAMONDS defined in line 26; never used
EIGHT defined in line 36; never used
EMPTY defined in line 42; used 15 times
FIVE defined in line 33; never used
FOUR defined in line 32; never used
HEARTS defined in line 25; never used
JACK defined in line 39; used 3 times
KING defined in line 41; never used
LGAME defined in line 21; used 3 times
NINE defined in line 37; never used
QUEEN defined in line 40; never used
SEVEN defined in line 35; never used
SGAME defined in line 22; used 3 times
SIX defined in line 34; never used
SPADES defined in line 24; never used
SUITS defined in line 16; used 5 times
TEN defined in line 38; never used
THREE defined in line 31; never used
TWO defined in line 30; never used

Usage of this include

Last modified: 1985-05-31
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2769
Valid CSS Valid XHTML 1.0 Strict