Advertisement
Guest User

role.lua

a guest
May 17th, 2015
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.24 KB | None | 0 0
  1. local robot = require("robot")
  2.  
  3. dis=0
  4. while true do
  5.   dis=dis+1
  6.   if robot.forward() == nil then
  7.     for i=1,dis-1 do
  8.       robot.back()
  9.     end
  10.     print("Измеренное расстояние: ", dis-1, " блока(ов).")
  11.     break
  12.   end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement