Annotation of 43BSDTahoe/games/cribbage/deck.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1980 Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution and use in source and binary forms are permitted
                      6:  * provided that the above copyright notice and this paragraph are
                      7:  * duplicated in all such forms and that any documentation,
                      8:  * advertising materials, and other materials related to such
                      9:  * distribution and use acknowledge that the software was developed
                     10:  * by the University of California, Berkeley.  The name of the
                     11:  * University may not be used to endorse or promote products derived
                     12:  * from this software without specific prior written permission.
                     13:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     14:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     15:  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     16:  *
                     17:  *     @(#)deck.h      5.3 (Berkeley) 6/18/88
                     18:  */
                     19: 
                     20: /*
                     21:  * define structure of a deck of cards and other related things
                     22:  */
                     23: 
                     24: 
                     25: #define                CARDS           52              /* number cards in deck */
                     26: #define                RANKS           13              /* number ranks in deck */
                     27: #define                SUITS           4               /* number suits in deck */
                     28: 
                     29: #define                CINHAND         4               /* # cards in cribbage hand */
                     30: #define                FULLHAND        6               /* # cards in dealt hand */
                     31: 
                     32: #define                LGAME           121             /* number points in a game */
                     33: #define                SGAME           61              /* # points in a short game */
                     34: 
                     35: #define                SPADES          0               /* value of each suit */
                     36: #define                HEARTS          1
                     37: #define                DIAMONDS        2
                     38: #define                CLUBS           3
                     39: 
                     40: #define                ACE             0               /* value of each rank */
                     41: #define                TWO             1
                     42: #define                THREE           2
                     43: #define                FOUR            3
                     44: #define                FIVE            4
                     45: #define                SIX             5
                     46: #define                SEVEN           6
                     47: #define                EIGHT           7
                     48: #define                NINE            8
                     49: #define                TEN             9
                     50: #define                JACK            10
                     51: #define                QUEEN           11
                     52: #define                KING            12
                     53: #define                EMPTY           13
                     54: 
                     55: #define                VAL(c)          ( (c) < 9 ? (c)+1 : 10 )    /* val of rank */
                     56: 
                     57: 
                     58: #ifndef TRUE
                     59: #      define          TRUE            1
                     60: #      define          FALSE           0
                     61: #endif
                     62: 
                     63: typedef                struct  {
                     64:                        int             rank;
                     65:                        int             suit;
                     66:                }               CARD;
                     67: 
                     68: typedef                char            BOOLEAN;
                     69: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.