?? cell.cpp
字號:
// Cell.cpp: implementation of the CCell class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "test.h"
#include "Cell.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CCell::CCell()
{
px=py=0;
f=g=h=0;
pParent=NULL;
}
CCell::CCell(int x,int y)
{
px=x;
py=y;
pParent=NULL;
}
CCell::~CCell()
{
}
void CCell::ComputeGHF()
{
/*int x,y;
x=abs(px-pParent->px);
y=abs(py-pParent->py);*/
int xa,ya;//npow;
xa=abs(px-pParent->px)*10;
ya=abs(py-pParent->py)*10;
if (xa==10 && ya==10)
g=14+pParent->g;
else
g=10+pParent->g;
f=g+h;
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -