Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Programm bei DerMarten --
- ----------------------------
- shell.run("clear")
- print("Street Turtle")
- -- Variablen
- -- Programm Schleifen zustandt
- active = true
- slot = 1
- ccout = 0
- -- Functionen
- function forward()
- if(turtle.detect) then
- --if(turtle.dig()) then
- --else
- --active = false
- --end
- turtle.forward()
- end
- end
- -- Programm Schleife
- while(active) do
- --if(turtle.detect()==false) then
- if(turtle.detectDown()) then
- count = 0
- if(ccout == 0) then
- shell.run("clear")
- print("Street Turtle .")
- end
- if(ccout == 1) then
- shell.run("clear")
- print("Street Turtle ..")
- end
- if(ccout == 2) then
- shell.run("clear")
- print("Street Turtle ...")
- end
- if(turtle.compareDown(slot)) then
- count = count + 1
- forward()
- if(turtle.compareDown(slot)) then
- count = count + 1
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- end
- forward()
- end
- --else
- --active = false
- --end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement