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

📄 horsetraveldemoview.h

📁 一个解决国际象棋的马周游问题的算法.本程序使用改善后的回溯算法来加速问题的解决.
💻 H
字号:
// HorseTravelDemoView.h : interface of the CHorseTravelDemoView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_HORSETRAVELDEMOVIEW_H__2A65615E_7C09_4498_A394_02B09CB68477__INCLUDED_)
#define AFX_HORSETRAVELDEMOVIEW_H__2A65615E_7C09_4498_A394_02B09CB68477__INCLUDED_

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

#define UM_SHOWINFO WM_USER+1
#define UM_HIDEINFO WM_USER+2

struct Node;

struct Pos
{
	int row;
	int col;
};

class CHorseTravelDemoView : public CView
{
protected: // create from serialization only
	CHorseTravelDemoView();
	DECLARE_DYNCREATE(CHorseTravelDemoView)

// Attributes
public:
	CHorseTravelDemoDoc* GetDocument();
	void SetMenuState(int state);
// Operations
public:
	int m_n;
	Pos* m_Path;
	int m_curPos;
	int m_startX;
	int m_startY;

private:
	int m_d;
	BOOL m_bStopDemo;
	CDialog* m_pDlgInfo;
	void DrawChessBoard(CDC* pDC);
	void DrawChess(CDC* pDC, int k);
	void ShowAllChesses(CDC* pDC);
	
	void ResizeView();
public:
	void GetSolvePath(Node* path);
	void ReleaseSolvePath();
	void Demo();
	afx_msg void ShowWaitInfo();
	afx_msg void HideWaitInfo();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHorseTravelDemoView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CHorseTravelDemoView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CHorseTravelDemoView)
	afx_msg void OnExec();
	afx_msg void OnStop();
	afx_msg void OnStopdemo();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in HorseTravelDemoView.cpp
inline CHorseTravelDemoDoc* CHorseTravelDemoView::GetDocument()
   { return (CHorseTravelDemoDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_HORSETRAVELDEMOVIEW_H__2A65615E_7C09_4498_A394_02B09CB68477__INCLUDED_)

⌨️ 快捷键说明

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