📄 state.cpp
字号:
// State.cpp: implementation of the CState class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "迷宫.h"
#include "State.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CState::CState()
{
R=-1;
C=-1;
D=-1;
father=0;
cost=0;
}
CState::~CState()
{
}
CState::CState(int r,int c, int d,int co,CState* f)
{
R=r;
C=c;
D=d;
father=f;
cost=co;
}
bool CState::operator ==(CState x)
{
return (R==x.R)&&(C==x.C)&&(D==x.D);
}
CState CState::operator =(CState x)
{
C=x.C;
R=x.R;
D=x.D;
cost=x.cost;
father=x.father;
visited=x.visited;
return *this;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -