Annotation of 43BSD/games/cribbage/deck.h, revision 1.1

1.1     ! root        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;
        !            58: 

unix.superglobalmegacorp.com

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