Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x,y,richtung, sFunk = ...
- local teste = x
- term.setBackgroundColor(colors.black)
- shell.run("clear")
- term.setTextColor(colors.blue)
- write("X-Richtung: "..(x or ""))
- x = (x or read())+0
- if teste then print() end
- write("Y-Richtung: "..(y or ""))
- y = (y or read())+0
- if teste then print() end
- write("Gehe in Richtung (r/l): "..(richtung or ""))
- richtung = richtung or read()
- if teste then print() end
- term.setTextColor(colors.green)
- write("Funktion ausfuehren: "..(sFunk or ""))
- local funk = loadstring(sFunk or read())
- local xL = 1
- local yL = 1
- while yL <= y do
- while xL < x do
- funk(xL,yL)
- turtle.forward()
- xL = xL + 1
- end
- funk()
- xL = 1
- if yL < y then
- if richtung == "r" then
- richtung = "l"
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- richtung = "r"
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- yL = yL + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement