Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rijtje = 1 -- hoeveel rijen al zijn gedaan op dat level
- line = 1 -- 1 of 0 voor directie
- row = 1 -- hoogte
- cycle = 1
- -- Goes down
- function godown()
- turtle.digDown()
- turtle.down()
- if cycle == 1 then
- turtle.turnRight()
- turtle.turnRight()
- cycle = 0
- elseif cycle == 0 then
- turtle.turnLeft()
- turtle.turnLeft()
- cycle = 1
- end
- rijtje = 1
- row = row + 1
- platform()
- end
- -- Goes straight ahead
- function forward()
- turtle.dig()
- turtle.forward()
- end
- -- Turns right
- function turnright()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- end
- -- Turns left
- function turnleft()
- turtle.turnLeft()
- forward()
- turtle.turnLeft()
- end
- -- Choose left or right
- function direction()
- if line == 1 then
- turnright()
- line = 0
- elseif line == 0 then
- turnleft()
- line = 1
- end
- initial()
- end
- function platform()
- i = 1
- while i < 5 and row < 10 do
- forward()
- i = i + 1
- if i == 5 and row <= 10 and rijtje == 5 then
- line = 1
- godown()
- end
- end
- if row == 9 then
- shell.run("info.lua")
- end
- rijtje = rijtje + 1
- direction()
- end
- function initial()
- while rijtje <= 5 do
- platform()
- rijtje = rijtje + 1
- end
- rijtje = 1 -- new test
- end
- initial()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement