📄 horseview.h
字号:
// HorseView.h : interface of the CHorseView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_HORSEVIEW_H__C708341F_7DFA_4D3A_82A0_3433E7C08DAF__INCLUDED_)
#define AFX_HORSEVIEW_H__C708341F_7DFA_4D3A_82A0_3433E7C08DAF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CHorseView : public CView
{
protected: // create from serialization only
CHorseView();
DECLARE_DYNCREATE(CHorseView)
int Qipan[8][8]; //定义棋盘
int count; //计数,遍历棋盘的格子的数目,即步数
int width; //棋盘的格子宽度
int nR; //定义棋子半径
int Step; //用于记录
int m_x; //马的当前X轴位置
int m_y; //马的当前Y轴位置
int i_y[64]; //定义栈空间,存放马所走的顺序
int i_x[64];
// Attributes
public:
CHorseDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHorseView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
int Exit_Number( int i,int j,int start,int array[ ] );
int Select_NextExit(int i,int j,int start);
void Horse_Visit( );
void Horse_Move( int a,int b );
virtual ~CHorseView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CHorseView)
afx_msg void OnMenuEnd();
afx_msg void OnMenuStart();
afx_msg void OnMenuNewstartpos();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in HorseView.cpp
inline CHorseDoc* CHorseView::GetDocument()
{ return (CHorseDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HORSEVIEW_H__C708341F_7DFA_4D3A_82A0_3433E7C08DAF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -