📄 game.h
字号:
// game.h: interface for the game class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GAME_H__7B0198E8_EBE4_4E15_840F_61F5B58557B1__INCLUDED_)
#define AFX_GAME_H__7B0198E8_EBE4_4E15_840F_61F5B58557B1__INCLUDED_
#include <time.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
using namespace std;
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define DFS 1
#define BFS 0
typedef struct Node
{
int m_data[7][7];
int m_num;
struct Node *m_parent;
} node;
class game
{
public:
void OnAutoplay(HWND hView);
void setBoard(Node*, int);
game();
virtual ~game();
void DrawBoard(HDC hdc, RECT client);
void PegSolution();
void Init(int style);
public:
UINT m_nodeNum;
void ResetBoardType(int);
int m_boardType;
void despath();
void movepeg(node*pf,int x, int y, int dir);
bool m_solutionFlag;
UINT m_iStepCount;
bool m_bAutoRun;
HWND m_hClientWin;
clock_t m_iTime;
UINT m_searchType;
Node *m_board;
deque<node*> m_opened;
queue<node*> m_closed;
list<node*> m_solution;
};
#endif // !defined(AFX_GAME_H__7B0198E8_EBE4_4E15_840F_61F5B58557B1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -