Guest User

ferma.lua

a guest
Feb 28th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1.  
  2. local robot = require("robot")
  3.  
  4. while true do
  5. print("Введите [go] или [stop]")
  6.   local a = io.read()
  7.     if a == 'stop' then
  8.       print("Программа остановлена")
  9.       do return end
  10.     else
  11.       while true do
  12.          if a == 'go' then    
  13.           robot.forward()
  14.           robot.turnLeft()
  15.          else
  16.           print("Введите задачу")
  17.           do return end          
  18.          end
  19.       end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment