Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions matching-game/CGameLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ bool CGameLogic::SearchPath(CGraph &graph, int nV0, int nV1)
// ����ͼ��nV0�У���0�е�nVexnum�У�ֵΪtrue�ĵ�
for (int nVi = 0; nVi < nVexnum; nVi++)
{
if (graph.GetArc(nV0, nVi) && !IsExsit(nVi))
if (graph.GetArc(nV0, nVi) && !IsExist(nVi))
{
// ѹ�뵱ǰ���㣬����Ϊ·����һ����Ч����
PushVertex(nVi);
Expand Down Expand Up @@ -235,7 +235,7 @@ bool CGameLogic::SearchPath(CGraph &graph, int nV0, int nV1)
}

// �ж϶����Ƿ�����·���д���
bool CGameLogic::IsExsit(int nVi)
bool CGameLogic::IsExist(int nVi)
{
for (int i = 0; i < m_nVexNum; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion matching-game/CGameLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CGameLogic
bool IsLink(CGraph &g, Vertex v1, Vertex v2); // �ж϶���v1��v2�Ƿ���ͨ
void Clear(CGraph &g, Vertex v1, Vertex v2); // ��V1��v2��ͨʱ�����䶥���ֵ��Ϊ��
bool SearchPath(CGraph &g, int nV0, int nV1); // ������������������ж�V1��ͼg���Ƿ���ͨ
bool IsExsit(int nVi); // �ж�����ΪnVi�Ķ����Ƿ񱣴浽��ͨ����m_anPath��
bool IsExist(int nVi); // �ж�����ΪnVi�Ķ����Ƿ񱣴浽��ͨ����m_anPath��
bool IsCorner(void); // �ж�����·�������У��������������Ƿ񹹳�һ���յ�
void PushVertex(int nV);
void PopVertex();
Expand Down