第一个if语句mazeMapArray[i][j]==1 是什么意思呢?为什么要判断是否等于1?
void MazeMap::drawMap() const
{
for(int i=0;i<mazeHeight;i++)
{
for(int j=0;j<mazeWidth;j++)
{
if(mazeMapArray[i][j] == 1)
{
cout << mazeWall;
}
else
{
cout << mazeRoad;
}
}
cout << endl;
}
}PS. 这是老师给出的源码MazeMap.cpp中的函数定义。