Advertisement
Guest User

plane

a guest
May 31st, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. local r=require("robot")
  2. r.turnRight()
  3. s=1
  4. for x=1,20 do
  5.   for y=1,20 do
  6.     r.forward()
  7.     r.select(s)
  8.     while 0==r.count(s) do
  9.       s=s+1
  10.       r.select(s)
  11.     end
  12.     r.placeDown()
  13.   end
  14.   if x%2 == 0 then
  15.     r.turnLeft()
  16.     r.forward()
  17.     r.turnLeft()
  18.   else
  19.     r.turnRight()
  20.     r.forward()
  21.     r.turnRight()
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement