playcards.h

来自「简单的游戏24点」· C头文件 代码 · 共 37 行

H
37
字号
// PlayCards.h: interface for the CPlayCards class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PLAYCARDS_H__211B487A_08B8_477D_883D_2EE5765707F8__INCLUDED_)
#define AFX_PLAYCARDS_H__211B487A_08B8_477D_883D_2EE5765707F8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <set>

/*单张扑克结构*/
struct card{
	enum SUIT suit;
	enum POINT point;
};
/*牌点枚举常量*/
enum POINT{TWO=IDB_DIAMAND_02, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, J, Q, K ,A };
/*花色枚举常量*/
enum SUIT{DIAMOND, CLUB=13, HEART=26, SPADE=39};
class CPlayCards  
{
public:
	static card m_deck[52];
	CPlayCards();
	virtual ~CPlayCards();
	int m_got_cards[4];
	void Draw(CDC*pDC,const CPoint &p,BOOL &shuffle);
	BOOL GetResult(CString&str);
	std::set<int> m_index_set;
protected:
	void Pick_Card();
};

#endif // !defined(AFX_PLAYCARDS_H__211B487A_08B8_477D_883D_2EE5765707F8__INCLUDED_)

⌨️ 快捷键说明

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