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

📄 robotgrid.h

📁 该程序实现两个机器人在一个二维网格中的自动追捕。通过方向键手动控制机器人A走步
💻 H
字号:
#if !defined(AFX_ROBOTGRID_H__3F2BC70D_0231_44C9_8668_60571AE6B829__INCLUDED_)
#define AFX_ROBOTGRID_H__3F2BC70D_0231_44C9_8668_60571AE6B829__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// RobotGrid.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRobotGrid window
#include "CommonData.h"

class CRobotGrid : public CStatic
{
// Construction
public:
	CRobotGrid();
	void  WhiteAutoCatch();
	void  BlackAutoEscape();
	void  EraseRobot(int RobotType);
private:
	void  DrawGrid(CDC *pdc);
	void  DrawRobot(int RobotType, CDC *pdc);
	
	void  WhiteCreateTree(SEARCHITEM *& pRoot);
	void  BlackCreateTree(SEARCHITEM *& pRoot);
	void  WhiteNextStep(SEARCHITEM *pRoot);
	void  BlackNextStep(SEARCHITEM *pRoot);
	void  ReleaseMem(SEARCHITEM *pRoot);
	BOOL  CheckIfSamePos(ROBOTITEM item1, ROBOTITEM item2);
// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRobotGrid)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CRobotGrid();

	// Generated message map functions
protected:
	//{{AFX_MSG(CRobotGrid)
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_ROBOTGRID_H__3F2BC70D_0231_44C9_8668_60571AE6B829__INCLUDED_)

⌨️ 快捷键说明

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