⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 suoha_algri.h

📁 是一个手机功能的模拟程序
💻 H
字号:

/*******************************************************************************

               Mobile Innovation(CHINA)

********************************************************************************                                                                              

 This software product is the property of Mobile Innovation(CHINA)Ltd and may not be
 disclosed to any third party without the express permission of the owner.                                 
                                                                              
********************************************************************************

 $Project name:	EG730                                                      
 $Project code:	EG730                                                           
 $Module:		GAME
 $File:		    suoha_algri.h
 $Revision:		1.0                                                       
                                                                              
 $Author:		Zigang Zhang                                                         
 $Date:		    04/19/02                                                      
                                                                               
********************************************************************************
                                                                              
 Description:

       This provides suoha game functionality
                        
********************************************************************************

/********************************************************************************
 $History: Suoha_algri.h
    Date .................. Modification ......................................
    08/14/2002    version 1.1.0 zhangzg 
 $End

*******************************************************************************/

/*******************************************************************************

                           Type definitions

********************************************************************************/
#define	TWO_SHANPAI      0
#define TWO_DUIZI        1
#define THREE_SHANPAI    2
#define THREE_DUIZI      3
#define THREE_SHANTIAO   4
#define FOUR_SHANPAI     5
#define FOUR_DUIZI       6
#define FOUR_SHANTIAO   8 
#define FOUR_LIANGDUI    7
#define FOUR_TIEZI       9
//card type of 5 cards

#define SHANPAI            10
#define DUIZI              11
#define LIANGDUI           12
#define SHANTIAO           13
#define SUNZI              14
#define TONGHUA            15
#define HULU               16
#define TIEZI              17
#define TONGHUASUN         18

/*
typedef enum
{
 SHANPAI      =      0,
 DUIZI              ,
 LIANGDUI           ,
 SHANTIAO           ,
 SUNZI              ,
 TONGHUA            ,
 HULU               ,
 TIEZI              ,
 TONGHUASUN      ,   
}
enumCardType;
*/
//the number of 8~A

#define TH8                0
#define TH9                1
#define TH10               2
#define THJ                3
#define THQ                4
#define THK                5
#define THA                6

//initial the number of money of the player and computer
#define PIM                15000
#define CIM                20000

//the action of computer
#define TWOCARDS10           10        //under the condition of two cards
#define TWOCARDS50           50
#define TWOCARDS100          100
#define TWOCARDSFOLL         100000
#define TWOCARDSQUIT         200000

#define THREECARDS10           10       //under the condition of three cards
#define THREECARDS200          200
#define THREECARDS300          300
#define THREECARDSFOLL         100000
#define THREECARDSQUIT         200000

#define FOURCARDS10           10
#define FOURCARDS300          300
#define FOURCARDS500          500
#define FOURCARDSFOLL         100000
#define FOURCARDSQUIT         200000

#define FIVECARDS10           10
#define FIVECARDS500          500
#define FIVECARDS1000         1000
#define FIVECARDSFOLL         100000
#define FIVECARDSQUIT         200000

#define NOMONEY            300000

#define PLAYER             19
#define COMPUTER           20


typedef struct 
{
   unsigned short   cardType;
   unsigned short   bigcard;
   unsigned short   smallcard;
} CardType;


void     ShuffleCards();
void     SendCards();
unsigned short    FirstNum(unsigned short onecard);
unsigned short    SecondNum(unsigned short onecard);
CardType Status_Two(unsigned short* whoCards);
CardType Status_Three(CardType twoStatus, unsigned short* whoCards);
CardType Status_Four(CardType threeStatus, unsigned short* whoCards);
CardType Status_Five(CardType fourStatus, unsigned short* whoCards);
//CardType GetLiangDui(int* whoCards);
//CardType GetDuiZi(int* whoCards);
CardType ClassifyShanPai(unsigned short* whoCards);
///////////////////////////////////////////////////////
//
unsigned long Two_Greater(CardType c_CT, unsigned short turnwho);
unsigned long Three_Greater(CardType c_CT, CardType p_CT, unsigned short turnwho);
unsigned long Three_Greater_Opp1(CardType c_CT, CardType p_CT, unsigned short turnwho, unsigned long pMoney); //zhangzg 08/23/2002
unsigned long Four_Greater(CardType c_CT, CardType p_CT, unsigned short turnwho);
unsigned long Four_Greater_Opp1(CardType c_CT, CardType p_CT, unsigned short turnwho, unsigned long pMoney);//zhangzg 08/23/2002
unsigned long Five_Greater(CardType c_CT, CardType p_CT, unsigned short turnwho);
unsigned short CompareTwo(unsigned short card1, unsigned short card2);
CardType CompareCards(CardType p_CardType, CardType c_CardType);
/////////////////////////////////////////////////
unsigned short Produce3Poss(unsigned char a1, unsigned char a2, unsigned char a3);
unsigned short Produce2Poss(unsigned char a1, unsigned char a2);
unsigned long ClassifyStake(unsigned short cardsnum, unsigned short classnum);
unsigned long ClassifyFollorQuit(unsigned short cardnum, unsigned short classnum);

/***************************判断谁先下注************************************/
unsigned short Cp_Stake();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -