Курсовая работа: Поиск в лабиринте
DFS_Visit(sm[i].y, sm[i].x);
}
color[y][x]=2;
}
void tLabirint::DFS()
{
flag=0;
DFS_Visit(start.y, start.x);
}
void tLabirint::DrawLabirint()
{
int i, j;
edge=15;
cx=getmaxx() / 2;
cy=getmaxy() / 2;
sx=cx-((count_a / 2)*edge-(edge / 2));
sy=cy-((count_a / 2)*edge-(edge / 2));
fx=sx+count_a*edge;
fy=sy+count_a*edge;
setcolor(RED);
gui->Rectangle(sx, sy, fx, fy);
for(i=1;i<=count_a;i++)
gui->Line(sx+i*edge, sy, sx+i*edge, fy);
for(i=1;i<=count_a;i++)
gui->Line(sx, sy+i*edge, fx, sy+i*edge);
for(i=1;i<=count_a;i++)
{
for(j=1;j<=count_a;j++)
{