Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. /*
  2. * Interface.cpp
  3. *
  4. * Created on: Apr 21, 2017
  5. * Author: Libi
  6. */
  7.  
  8. #include <string>
  9. #include <vector>
  10. using std::vector;
  11.  
  12. vector <string> RobotNames;
  13. vector <int> Loc_X;
  14. vector<int> Loc_Y;
  15.  
  16. void StartControl() {
  17. string Order;
  18. string RobotName;
  19. char Direction;
  20. int x, y;
  21. std::cout << "Start entering commands:" << std::endl;
  22. while (std::cin>>Order){
  23. if ("Order"=="Move"){
  24. std::cin>>RobotName;
  25. std::cin>>Direction;
  26. Move_Robot(RobotName, Direction);
  27. }
  28. /* else if ("Order"=="addDirt")
  29. {
  30. std::cin>>x;
  31. std::cin>>y;
  32. addDirt(x,y);
  33. }
  34. else if ("Order"=="Clean")
  35. {
  36. std::cin>>RobotName;
  37. Clean (RobotName);
  38. }
  39. else if ("Order"=="Place")
  40. {
  41. std::cin>>RobotName;
  42. std::cin>>x;
  43. std::cin>>y;
  44. Place_Robot(RobotName, x, y);
  45. }
  46.  
  47. else if("Order"=="Delete")
  48. {
  49. std::cin>>RobotName;
  50. Delete_Robot(RobotName);
  51. }
  52. else if("Order"=="MoveMulti")
  53. {
  54. std::cin>>RobotName;
  55. std::cin>>Direction;
  56. Move_Robot(RobotName, Derection, x, y);
  57. while(Direction!="end")
  58. {
  59. std::cin>>Direction;
  60. Move_Robot(RobotName, Direction);
  61. }
  62. }
  63.  
  64.  
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement