mirror of
https://gitee.com/yyz_o/bk_bishe_pi.git
synced 2025-09-07 23:21:26 +00:00
62 lines
1.1 KiB
C++
62 lines
1.1 KiB
C++
#include<iostream>
|
|
#include<string>
|
|
#include"eyebot++.h"
|
|
#include"maze_func.h"
|
|
using namespace std;
|
|
|
|
|
|
/*---打印数组检查错误---*/
|
|
/*---打印数组mark,map,copy_map等二维数组所用的函数---*/
|
|
void output_arr2D(int size_x, int size_y, int *arr)
|
|
{
|
|
for (int i = size_y - 1; i >= 0; i--)
|
|
{
|
|
for (int j = 0; j < size_x; j++)
|
|
{
|
|
cout << arr[(j * size_y) + i] << "\t";
|
|
}
|
|
cout << endl;
|
|
}
|
|
cout << endl;
|
|
}
|
|
|
|
/*---打印数组wall---*/
|
|
void output_arrwall(int size_x, int size_y, int *arr)
|
|
{
|
|
for (int i = size_y; i >= 0; i--)
|
|
{
|
|
for (int j = 0; j <= size_x; j++)
|
|
{
|
|
if (arr[(j * (size_y + 1) * 2) + (i * 2) + 1] == 1)
|
|
{
|
|
cout << "|" ;
|
|
}
|
|
else
|
|
{
|
|
cout << " " ;
|
|
}
|
|
|
|
if (arr[(j * (size_y + 1) * 2) + (i * 2) + 0] == 1)
|
|
{
|
|
cout << "_" ;
|
|
}
|
|
else
|
|
{
|
|
cout << " " ;
|
|
}
|
|
}
|
|
cout << endl;
|
|
}
|
|
cout << endl;
|
|
}
|
|
|
|
void output_arrpath(int size, int *arr)
|
|
{
|
|
for (int i = 0; i < size; i++)
|
|
{
|
|
cout << arr[i] << " ";
|
|
}
|
|
cout << endl;
|
|
cout << endl;
|
|
}
|