JoshuaKade

pltfrm v0

Jun 16th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("+-------------------------------------+")
  4. print("|  Please place fuel in the lower-    |")
  5. print("|  right slot.                        |")
  6. print("+-------------------------------------+")
  7. sleep(1)
  8. print("How big of a square do you want? ")
  9.  
  10. sqrSize = read()
  11.  
  12. function plcColumn()
  13.   for i = 1, sqrSize do
  14.     turtle.forward()
  15.     turtle.placeDown()
  16.   end
  17. end
  18.  
  19. --Even Column Placement
  20.  
  21. function aa()
  22.     turtle.placeDown()
  23.     plcColumn()
  24.     turtle.turnLeft()
  25.     turtle.forward()
  26.     turtle.turnLeft()
  27. end
  28.  
  29. --Odd Column Placement
  30.  
  31. function ab()
  32.     turtle.placeDown()
  33.     plcColumn()
  34.     turtle.turnRight()
  35.     turtle.forward()
  36.     turtle.turnRight()
  37. end
  38.  
  39. if sqrSize %2 == 0 then
  40.   isEven = true
  41. else
  42.   isEven = false
  43. end
  44.  
  45. --print(isEven)
  46. --Test for isEven ^
  47.  
  48. if isEven == true then
  49.   for i = 1, sqrSize/2 do
  50.     aa()
  51.     ab()
  52.   end
  53. else
  54.   for i = 1, sqrSize/2 do
  55.     aa()
  56.     ab()
  57.   end
  58.   aa()
  59. end
Advertisement
Add Comment
Please, Sign In to add comment