Ezteyh

terraform

Jun 14th, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. print("longueur : ")
  2. print("largeur : ")
  3. local longueur = io.read()
  4. local largeur = io.read()
  5.  
  6. for j = 1, largeur, 1 do
  7.  
  8.     for i = 1, longueur-1, 1 do
  9.         turtle.digDown()
  10.         turtle.forward()
  11.         if turtle.detectDown() then
  12.          turtle.digDown()
  13.         else
  14.         end
  15.         turtle.digDown()
  16.     end
  17.    
  18. if (j % 2 == 0) then
  19.     turtle.turnRight()
  20.     turtle.forward()
  21.     turtle.turnRight()
  22. else
  23.     turtle.turnLeft()
  24.     turtle.forward()
  25.     turtle.turnLeft()
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment