CServerLogic.h
资源名称:1731.rar [点击查看]
上传用户:swkcbjrc
上传日期:2016-04-02
资源大小:45277k
文件大小:5k
源码类别:
游戏
开发平台:
Visual C++
- // Copyright (C) 1991 - 1999 Rational Software Corporation
- #if defined (_MSC_VER) && (_MSC_VER >= 1000)
- #pragma once
- #endif
- #ifndef _INC_CSERVERLOGIC_3D19D50B035E_INCLUDED
- #define _INC_CSERVERLOGIC_3D19D50B035E_INCLUDED
- //##ModelId=3D19D50B035E
- class CServerLogic
- {
- public:
- //##ModelId=3D19D50B037C
- CServerLogic();
- //##ModelId=3D19D50B03D6
- CServerLogic(CPtrList* pListFourUser);
- //##ModelId=3D19D50C008F
- void InitBridgeGame(CPtrList* pListFourUser);
- //开始叫牌过程
- //##ModelId=3D19D50C00D5
- void DoCallCard(void );
- //开始打牌过程
- //##ModelId=3D19D50C0125
- void DoPopCard(void );
- //结束本次比赛
- //##ModelId=3D19D50C0175
- void DoPlayEnd(void );
- //##ModelId=3D19D50C01BB
- void SetCurNum(int nCurNum);
- //##ModelId=3D19D50C01F7
- int GetCurNum(void );
- //##ModelId=3D19D50D002C
- BYTE GetPhase(void );
- //##ModelId=3D19D50D005E
- void SetPhase(BYTE bytePhase);
- //##ModelId=3D19D50D009A
- CPtrList* GetListAllCard(void );
- //取得当前的叫牌方向
- //##ModelId=3D19D50D00CC
- BYTE GetCurCallDirect(void );
- //取得以前的叫牌方向
- //##ModelId=3D19D50D0108
- BYTE GetOldCallDirect(void );
- //##ModelId=3D19D50D0180
- void SetStateUserCount(BYTE byteStateUserCount);
- //##ModelId=3D19D50D01BC
- BYTE GetStateUserCount(void );
- //##ModelId=3D19D50D01EE
- CPtrList* GetListCallCard(void );
- //##ModelId=3D19D50D027B
- void SetPromise(void );
- //##ModelId=3D19D50D02AD
- LPNODECALLCARD GetPromise(void );
- //##ModelId=3D19D50D0393
- CString GetPromiseUserId(void );
- //##ModelId=3D19D50D03BB
- BYTE GetOldPopDirect(void );
- //##ModelId=3D19D50E0019
- BYTE GetCurPopDirect(void );
- //##ModelId=3D19D50E005F
- CPtrList* GetListPopCard(void );
- //##ModelId=3D19D50E009B
- CPtrList* GetListFourCard(void );
- //##ModelId=3D19D50E00C3
- CPtrList* GetListSureAlert(void );
- //##ModelId=3D19D50E00F6
- CCardObj* CompareCard(void );
- //##ModelId=3D19D50E011E
- BOOL CheckPopCardIsOver(void );
- //##ModelId=3D19D50E0146
- void CalculateCent(void );
- //##ModelId=3D19D50E0272
- CPtrList* GetListPlayResult(void );
- //取得一个用户指针
- //##ModelId=3D19D50E02F4
- LPPLAYUSERINFO GetUserInfoById(CString strUserId);
- //取得一个用户的得分情况指针
- //##ModelId=3D19D50E0308
- LPPLAYRESULT GetUserResultById(CString strUserId);
- //取得一个用户信息BY方向
- //##ModelId=3D19D50E0326
- LPPLAYUSERINFO GetUserInfoByDirect(BYTE byDirect);
- //根据USERID取得他的确认信息
- //##ModelId=3D19D50E034E
- LPSUREALERT GetSureAlertByUserId(CString strUserId);
- //取得确认声称中正确的信息个数
- //##ModelId=3D19D50E036C
- int GetSureAlertTrueCount(void );
- //设置声称吨数
- //##ModelId=3D19D50E03C7
- void SetAlertPromise(CString strUserId, int nAlertTons);
- //##ModelId=3D19D50E03E5
- LPALERTPROMISE GetAlertPromise(void );
- //添加一个叫牌过程
- //##ModelId=3D19D50F0011
- void AddCallCardInfo(BYTE byteCallColor, BYTE byteCallNumber, BYTE byteCallSign, CString strUserId);
- //##ModelId=3D19D50F0089
- void AddPopCardInfoToFourCardList(BYTE bytePopColor, BYTE bytePopNumber, CString strUserId);
- private:
- //##ModelId=3D19D51103CB
- CRITICAL_SECTION m_csListCallCard;
- //##ModelId=3D19D512000B
- CRITICAL_SECTION m_csListPopCard;
- //##ModelId=3D19D5120033
- CRITICAL_SECTION m_csListSureAlert;
- //##ModelId=3D19D512005B
- CRITICAL_SECTION m_csShowPopEndCount;
- //##ModelId=3D19D512008D
- CRITICAL_SECTION m_csGameEnd;
- //##ModelId=3D19D51200B5
- CRITICAL_SECTION m_csGetCurPopDirect;
- //##ModelId=3D19D51200DD
- CRITICAL_SECTION m_csStateUserCount;
- //##ModelId=3D19D512010F
- CRITICAL_SECTION m_csUserBreakGame;
- //##ModelId=3D19D5120137
- BYTE m_byteGameState;
- //##ModelId=3D19D5120192
- int m_nCurNum;
- //##ModelId=3D19D51201C4
- BYTE m_bytePhase;
- //##ModelId=3D19D51201EC
- BYTE m_byteFirstCallDirect;
- //##ModelId=3D19D512021E
- BYTE m_byteCurCallDirect;
- //##ModelId=3D19D5120246
- BYTE m_byteOldCallDirect;
- //##ModelId=3D19D5120278
- BYTE m_byteStateUserCount;
- //##ModelId=3D19D5120318
- CString m_strViewUserId;
- //##ModelId=3D19D512034A
- CString m_strFirstUserId;
- //打牌过程
- //##ModelId=3D19D5120372
- BYTE m_byteFirstPopDirect;
- //##ModelId=3D19D51203AE
- BYTE m_byteCurPopDirect;
- //##ModelId=3D19D5130002
- BYTE m_byteOldPopDirect;
- //##ModelId=3D19D5130034
- BYTE m_byteTempPopDirect;
- //##ModelId=3D19D5130067
- BYTE m_byteEWCount;
- //##ModelId=3D19D5130099
- BYTE m_byteNSCount;
- //##ModelId=3D19D51300CB
- int m_nEastCent;
- //##ModelId=3D19D51300FD
- int m_nWestCent;
- //##ModelId=3D19D513012F
- int m_nNorthCent;
- //##ModelId=3D19D5130161
- int m_nSouthCent;
- //##ModelId=3D19D5130189
- BOOL m_bGoOnPop;
- //##ModelId=3D19D51301BB
- int m_nShowPopEndCount;
- //##ModelId=3D19D512016A
- LPPLAYUSERINFO m_arrNodeUser[4];
- //##ModelId=3D19D51202AB
- NODECALLCARD m_nodePromise;
- //##ModelId=3D19D51202E7
- ALERTPROMISE m_nodeAlertPromise;
- //##ModelId=3D19D50F01F1
- void DealCard(void );
- //##ModelId=3D19D50F02B0
- void DoPhase(void );
- //##ModelId=3D19D50F02F6
- void InitPlayFourUser(CPtrList* pListFourUser);
- //算当前赢吨数
- //##ModelId=3D19D51000F8
- void CalulateCount(void );
- //定约方赢吨
- //##ModelId=3D19D5100121
- void CalculateUpCount(int nCount);
- //定约方输吨
- //##ModelId=3D19D5100149
- void CalculateDownCount(int nCount);
- //##ModelId=3D19D5100167
- int GetMpCent(int nBaseCent, BYTE byType);
- };
- #endif /* _INC_CSERVERLOGIC_3D19D50B035E_INCLUDED */