SHARE
TWEET

role.lua

a guest May 17th, 2015 323 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top