Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Interface.cpp
- *
- * Created on: Apr 21, 2017
- * Author: Libi
- */
- #include <string>
- #include <vector>
- using std::vector;
- vector <string> RobotNames;
- vector <int> Loc_X;
- vector<int> Loc_Y;
- void StartControl() {
- string Order;
- string RobotName;
- char Direction;
- int x, y;
- std::cout << "Start entering commands:" << std::endl;
- while (std::cin>>Order){
- if ("Order"=="Move"){
- std::cin>>RobotName;
- std::cin>>Direction;
- Move_Robot(RobotName, Direction);
- }
- /* else if ("Order"=="addDirt")
- {
- std::cin>>x;
- std::cin>>y;
- addDirt(x,y);
- }
- else if ("Order"=="Clean")
- {
- std::cin>>RobotName;
- Clean (RobotName);
- }
- else if ("Order"=="Place")
- {
- std::cin>>RobotName;
- std::cin>>x;
- std::cin>>y;
- Place_Robot(RobotName, x, y);
- }
- else if("Order"=="Delete")
- {
- std::cin>>RobotName;
- Delete_Robot(RobotName);
- }
- else if("Order"=="MoveMulti")
- {
- std::cin>>RobotName;
- std::cin>>Direction;
- Move_Robot(RobotName, Derection, x, y);
- while(Direction!="end")
- {
- std::cin>>Direction;
- Move_Robot(RobotName, Direction);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement