?? basemethod.h
字號(hào):
#if !defined(AFX_BASEMETHOD_H__6A606901_2986_11D9_8F87_A1FB26067535__INCLUDED_)
#define AFX_BASEMETHOD_H__6A606901_2986_11D9_8F87_A1FB26067535__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BaseMethod.h : header file
//
#include <afxtempl.h>
/////////////////////////////////////////////////////////////////////////////
// CBaseMethod window
struct OPEN{
BYTE matrix[3][3];//存放狀態(tài)結(jié)構(gòu)
int returnPoint;//返回指針
int gValue;
int hValue;
};
struct CLOSED{
int SelfNumber;
BYTE matrix[3][3];
int returnPoint;
int gValue;
int hValue;
};
class CBaseMethod : public CView
{
// Construction
public:
CBaseMethod();
// Attributes
public:
BYTE basematrix[3][3];
BYTE destmatrix[3][3];
BYTE m_xIndex;
BYTE m_yIndex;
void OnDraw(CDC* pDC);
BOOL IsSuccess;
CList <OPEN,OPEN> *OpenList;
CList <CLOSED,CLOSED> *ClosedList;
// Operations
public:
BOOL OnResolve();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBaseMethod)
//}}AFX_VIRTUAL
// Implementation
public:
void SetWitchOne(int witch);
int m_witchone;
int m_SearchDepth;
void SetDepth(int m_Depth);
BOOL CanOutPut;
void CreateOutputList();
BOOL IsFinish;
CPoint m_tableRD;
CPoint m_tableLU;
BOOL IsTheSame(BYTE matrix1[][3],BYTE matrix2[][3]);
BOOL IsInClosedList(OPEN opElem);
BOOL IsInOpenList(OPEN opElem);
int CreateHValue(BYTE matrix[][3]);
BOOL SearchZeroIndex(BYTE matrix[][3]);
BOOL IsGetGoal(BYTE matrix[][3]);
OPEN ChooseMinFromOpen();
virtual ~CBaseMethod();
// Generated message map functions
protected:
//{{AFX_MSG(CBaseMethod)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BASEMETHOD_H__6A606901_2986_11D9_8F87_A1FB26067535__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -