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

📄 chessview.h

📁 evc开发的五子棋游戏.是基于wince4.2开发的
💻 H
字号:
// chessView.h : interface of the CChessView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_chessVIEW_H__9FBADA6D_CAD7_11D5_B2C4_5254AB2BD63E__INCLUDED_)
#define AFX_chessVIEW_H__9FBADA6D_CAD7_11D5_B2C4_5254AB2BD63E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define BOARD_LINE_NUMBER		19
class CChessView : public CView
{
protected: // create from serialization only
	CChessView();
	DECLARE_DYNCREATE(CChessView)

// Attributes
public:
	CChessDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChessView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void OnOpen();
	char* THCAR2char(TCHAR* tchStr);
	void OnSave();
	int Judge(int nX, int nY, int cValue);
	CPoint vspoint;//保存vscomputer时白棋位置
	int vscomputer;
	void searchcandown1(int i,int j,int n);
	void searchcandown2(int i,int j,int n);
	void searchcandown3(int i,int j,int n);
	void searchcandown4(int i,int j,int n);
	CPoint maxnum(int a,int b,int c,int d);
	void bestputdown(int i,int j);
	void computerdown();
	void putdown(CPoint point);
	void over(CPoint point);
	HCURSOR hcursorwhite;
	HCURSOR hcursorblack;
	int wzq[19][19];
		int		m_nType;
	bool colorwhite;
	CBitmap m_bmblack;
	CBitmap m_bmwhite;
	CPoint bpointcan4,//这个位置空,它旁边有四个黑棋
		wpointcan4,//这个位置空,它旁边有四个白棋
		bpointcan3,//这个位置空,它的旁边有三个黑棋
		wpointcan3,//这个位置空,它的旁边有三个白棋
		bpointcan2,//这个位置空,它的旁边有两个黑棋
		wpointcan2,//这个位置空,它的旁边有两个白棋
		bpointcan1;//不是以上情况,这个位置空		
	virtual ~CChessView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CChessView)
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnStart();
	afx_msg void OnPlayer();
	afx_msg void OnCpmputer();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in chessView.cpp
inline CChessDoc* CChessView::GetDocument()
   { return (CChessDoc*)m_pDocument; }
#endif

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_chessVIEW_H__9FBADA6D_CAD7_11D5_B2C4_5254AB2BD63E__INCLUDED_)

⌨️ 快捷键说明

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