Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = { ... }
- local function man(algo)
- for v in string.gmatch(algo, "%a") do
- if (v == "l") then turtle.turnLeft()
- elseif (v == "r") then turtle.turnRight()
- elseif (v == "f") then turtle.forward()
- elseif (v == "u") then turtle.up()
- elseif (v == "d") then turtle.down()
- elseif (v == "b") then turtle.back()
- elseif (v == "p") then print("lol")
- else print("Impossible algorithm.") return false
- end
- end
- return true
- end
- man(tostring(arg[1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement