2025.5.15第三次提交,继续修改

This commit is contained in:
氧原子
2025-05-15 22:40:18 +08:00
parent 75f7336601
commit a81594bf68
8 changed files with 63 additions and 55 deletions

View File

@@ -26,11 +26,11 @@ void output_arr2D(int size_x, int size_y, int *arr)
void output_arrwall(int size_x, int size_y, int *arr)
{
for (int i = size_y - 1; i >= 0; i--)
for (int i = size_y; i >= 0; i--)
{
for (int j = 0; j < size_x; j++)
for (int j = 0; j <= size_x; j++)
{
if (arr[(j * size_y * 2) + (i * 2) + 1] == 1)
if (arr[(j * (size_y + 1) * 2) + (i * 2) + 1] == 1)
{
cout << "|" ;
}
@@ -39,7 +39,7 @@ void output_arrwall(int size_x, int size_y, int *arr)
cout << " " ;
}
if (arr[(j * size_y * 2) + (i * 2) + 0] == 1)
if (arr[(j * (size_y + 1) * 2) + (i * 2) + 0] == 1)
{
cout << "_" ;
}