Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- y = 0
- dir = "north"
- function check()
- if dir == "north" then
- if y*-1 == X then
- turtle.turnRight()
- dir = "east"
- end
- end
- end
- function forward()
- turtle.forward()
- switch (dir)
- case "north": y=y+1
- case "south": y=y-1
- case "west": x=x-1
- case "east": x=x+1
- end
- check()
- end
- while true do
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement