daily pastebin goal
56%
SHARE
TWEET

Raum_ausheben

a guest Jun 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Laenge ?")
  2. l = tonumber(read())
  3.  
  4. print("Breite ?")
  5. b = tonumber(read())
  6.  
  7. print("Tiefe ?")
  8. t = tonumber(read())
  9.  
  10. right = true
  11.  
  12. function forward()
  13.     while(not turtle.forward()) do
  14.         turtle.dig()
  15.     end
  16. end
  17.  
  18. function down()
  19.     while(not turtle.down()) do
  20.         turtle.digDown()
  21.     end
  22. end
  23.  
  24. function turn()
  25.     if(right) then
  26.         turtle.turnRight()
  27.     else
  28.         turtle.turnLeft()
  29.     end
  30. end
  31.    
  32. for y=1, t do
  33.     for z=1, b do
  34.         for x=1, l-1 do
  35.             forward()        
  36.         end
  37.         turn()
  38.         if(z ~= b) then
  39.             forward()
  40.         end
  41.         turn()
  42.         right = not right
  43.     end
  44.     if(y ~= t) then
  45.         down()
  46.     end
  47.     right = not right
  48. 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