daily pastebin goal
34%
SHARE
TWEET

test2

a guest Jul 11th, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. temp = true
  2. while temp do
  3.   print "input size"
  4.   size = read("*n")
  5.   build(size)
  6.   temp = false
  7. end
  8.  
  9. function build(x)
  10.   for i=0,x,1 do
  11.     buildCol(x)
  12.     turtle.forward()
  13.   end  
  14. end
  15.  
  16. function buildCol(x)
  17.   turtle.placeDown()
  18.   turtle.turnLeft()
  19.   y= (x-1)/2
  20.   for i=0,y,1 do
  21.     turtle.forward()
  22.     turtle.placeDown()
  23.   end
  24.   turnAround()
  25.   forward(y)
  26.   for i=0,y,1 do
  27.     turtle.forward()
  28.     turtle.placeDown()
  29.   end
  30.   turnAround()
  31.   forward(y)
  32.   turtle.turnRight()
  33. end
  34.  
  35. function forward(x)
  36.   for i=0,x,1 do
  37.     turtle.forward()
  38.   end
  39. end
  40. function turnAround()
  41.   turtle.turnLeft()
  42.   turtle.turnLeft()
  43. 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