第一次提交

This commit is contained in:
氧原子
2025-05-14 12:34:56 +08:00
parent 64518bf42d
commit 8b2d592220
14 changed files with 929 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
#include<iostream>
#include<string>
#include<vector>
#include"eyebot++.h"
#include"maze_func.h"
#include"maze_parameter.h"
using namespace std;
/*---打印数组检查错误---*/
/*---打印数组mark,map,copy_map等二维数组所用的函数---*/
void output_arr2D(int *arr)
{
int rows = sizeof(arr) / sizeof(arr[0]);
int cols = sizeof(arr[0]) / sizeof(arr[0][0]);
for (int i = cols - 1; i >= 0; i--)
{
for (int j = 0; j < rows; j++)
{
cout << arr[j][i] << " ";
}
cout << endl;
}
}
/*---打印数组wall---*/
void output_arrwall(int *arr)
{
int rows = sizeof(arr) / sizeof(arr[0]);
int cols = sizeof(arr[0]) / sizeof(arr[0][0]);
for (int i = cols - 1; i >= 0; i--)
{
for (int j = 0; j < rows; j++)
{
if (arr[j][i][1] == 1)
{
cout << "|" ;
}
else
{
cout << " " ;
}
if (arr[j][i][0] == 1)
{
cout << "_" ;
}
else
{
cout << " " ;
}
}
cout << endl;
}
}
/*---打印数组path---*/
void output_arrpath(int *arr)
{
int size = sizeof(arr) / sizeof(arr[0]);
for (i = 0; i < size; i++)
{
cout << arr[i] << " ";
}
cout << endl;
}