Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = {...}
- arg[2] = arg[2]+0
- d = 0
- d = arg[2]
- arg[1] = arg[1] +0
- function forward ()
- for i=1, d , 1 do
- turtle.forward()
- end
- end
- function back ()
- for i=1, d , 1 do
- turtle.back()
- end
- end
- function left ()
- turtle.turnLeft()
- forward()
- end
- function right ()
- turtle.turnRight()
- forward()
- end
- function up ()
- for i=1, d , 1 do
- turtle.up()
- end
- end
- function down ()
- for i=1, d , 1 do
- turtle.down()
- end
- end
- if arg[1]==1 then
- forward()
- end
- if arg[1]==3 then
- back()
- end
- if arg[1]==2 then
- left()
- end
- if arg[1]==4 then
- right()
- end
- if arg[1]==5 then
- up()
- end
- if arg[1]==6 then
- down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement