2025.5.17第二次提交,添加根据实机调试修改的版本

This commit is contained in:
氧原子
2025-05-17 15:12:16 +08:00
parent 5ce7796b14
commit 47a4473330
15 changed files with 940 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
#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] << " ";
}
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;
}
}
void output_arrpath(int size, int *arr)
{
for (int i = 0; i < size; i++)
{
cout << arr[i] << " ";
}
cout << endl;
}