src/Card.c
[NalaBridge.git] / src / Card.h~
blob46e764f8ad578ac50a4bad9258dc169f4ee2996c
1 /***************************************************************************
2  *   Copyright (C) 2008 by NalaGinrut   *
3  *   suimualatsuki@163.com   *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 #ifndef CARD_H
21 #define CARD_H
23 #include "my_types.h"
25 #define Club    0
26 #define Diamond 1
27 #define Heart   2
28 #define Spider  3
30 typedef enum CC
31 {C2= 1,C3,C4,C5,C6,C7,C8,C9,C10= 9,CJ=41,CQ,CK,CA=44}ClubCard;
33 typedef enum DC
34 {D2=11,D3,D4,D5,D6,D7,D8,D9,D10=19,DJ=45,DQ,DK,DA=48}DiamondCard;
36 typedef enum HC
37 {H2=21,H3,H4,H5,H6,H7,H8,H9,H10=29,HJ=51,HQ,HK,HA=54}HeartCard;
39 typedef enum SC
40 {S2=31,S3,S4,S5,S6,S7,S8,S9,S10=39,SJ=55,SQ,SK,SA=58}SpiderCard;
42 //ASCIIµÄ»¨É«¶ÔÓ¦£ºascii-2:Spider,ascii-3:Heart,ascii-4:Diamond,ascii-5:Club;
44 //ÈôΪ½«ÅÆÔòȨ¼Ó50;
46 typedef struct HandCard
47   {
48           UINT8 card_list[13];
49   }
50 card,*cardptr;//card°üÀ¨suitºÍµãÊýnum£»
52 typedef struct Bider
54         UINT8 suit;
55         UINT8 level;
56 }bider;//biderÊǽÐÅÆʱºòµÄ½á¹¹£¬°üÀ¨suitºÍlevel£»
58 #endif // END OF CARD_H;