mirror of
https://gitee.com/yyz_o/bk_bishe_pi.git
synced 2025-09-07 23:21:26 +00:00
2025.5.31第一次提交优化代码结构,头文件等
This commit is contained in:
26
bot_code_turn/maze_func_cin.cpp
Normal file
26
bot_code_turn/maze_func_cin.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include<iostream>
|
||||
#include<string>
|
||||
#include<vector>
|
||||
#include"maze_parameter.h"
|
||||
#include"maze_func.h"
|
||||
using namespace std;
|
||||
|
||||
void cin_targey()
|
||||
{
|
||||
int size_x = mark.size();
|
||||
int size_y = mark[0].size();
|
||||
|
||||
int num = 0;
|
||||
do
|
||||
{
|
||||
if (!num)
|
||||
{
|
||||
cout << "您输入的目标点超出迷宫范围,请重新输入" << endl;
|
||||
}
|
||||
cout << "请输入目标点的X,Y坐标值 用空格隔开并回车" << endl;
|
||||
cin >> target_x >> target_y;
|
||||
cout << endl;
|
||||
num++;
|
||||
} while (target_x <= size_x && target_y <= size_y);
|
||||
cout << endl;
|
||||
}
|
||||
Reference in New Issue
Block a user