Advertisement
Guest User

wall

a guest
Jun 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. io.write("Length of the wall : ")
  2. length = io.read()
  3. io.write("Height of the wall : ")
  4. height = io.read()
  5.  
  6. turtle.up()
  7. turtle.select(1)
  8.  
  9. for h=0,height do
  10.   for l=0,length do
  11.     if turtle.detectDown() then
  12.       turtle.digDown()
  13.     end
  14.     turtle.placeDown()
  15.     turtle.forward()
  16.   end
  17.   turtle.up()
  18.   halfturn()
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement