SHARE
TWEET

eva

a guest Feb 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. write("wie weit soll gegraben werden ?")
  3. lange = io.read()
  4.  
  5. shell.run("clear")
  6.  
  7. write("wie breit?")
  8. breit = io.read()
  9.  
  10. shell.run("clear")
  11.  
  12.  
  13. function tf()
  14.  
  15.   for forward = 0,lange do  
  16.          
  17.     turtle.dig()
  18.     turtle.forward()
  19.      
  20.     if forward == lange then
  21.        
  22.         tb()
  23.     end
  24.   end
  25. end
  26.  
  27. function tb()
  28.  
  29.   switch = 0
  30.  
  31.   for breite = 0,breit do
  32.  
  33.     if switch == 0 then
  34.    
  35.       turtle.turnLeft()
  36.       turtle.forward()
  37.       turtle.turnLeft()
  38.       switch = 1
  39.     else
  40.       turtle.turnRight()
  41.       turtle.forward()
  42.       turtle.turnRight()
  43.       switch = 0
  44.      
  45.     end
  46.   end
  47. end
  48.  
  49. shell.run("clear")
  50.  
  51. tf()
  52.  
  53. print("Auftrag wird nun erledigt")
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