tttdoc.h

来自「API经典入门」· C头文件 代码 · 共 51 行

H
51
字号
// tttdoc.h : interface of the CTTTDoc class
//
/////////////////////////////////////////////////////////////////////////////

#define BOARD_SIZE 3

class CTTTDoc : public CDocument
{
protected: // create from serialization only
	CTTTDoc();
	DECLARE_DYNCREATE(CTTTDoc)

// Attributes
public:
	char m_acBoard[BOARD_SIZE][BOARD_SIZE];
	char m_cGameStatus;
	char m_cWhoGoesFirst;
	int m_nBestI, m_nBestJ;

// Operations
public:
	void AnalyzeBoard();
	
protected:
	int m_nIterator;
	void InitWinSumIterator();
	BOOL NextWinSum(int &nSum, int &nBestI, int &nBestJ);

// Implementation
public:
	virtual ~CTTTDoc();
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	virtual BOOL OnNewDocument();

// Generated message map functions
protected:
	//{{AFX_MSG(CTTTDoc)
	afx_msg void OnOptionsHumanstart();
	afx_msg void OnUpdateOptionsHumanstart(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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