View difference between Paste ID: eFUEyXpt and seS9LB2J
SHOW: | | - or go back to the newest paste.
1
--initialisierung
2
turtle.select(1)
3
turtle.refuel()
4
turtle.select(16)
5
richtung=true
6
run=true
7
8
function fGRABEN()
9
  while turtle.detectUp() == true do
10
    turtle.digUp()
11
  end
12
  if turtle.detect() == true then
13
    turtle.dig()
14
  end
15
  turtle.forward()
16
  if turtle.detectDown() == true then
17
    turtle.placeDown()
18
  end
19
end
20
21-
while run==true do
21+
for i=1,10 do
22-
  for i=1,10 do
22+
  fGRABEN()
23
end
24
if richtung==true then
25-
  if richtung==true then
25+
    turtle.turnLeft()
26-
      turtle.turnLeft()
26+
27-
      fGRABEN()
27+
    turtle.turnLeft()
28-
      turtle.turnLeft()
28+
    richtung=false
29-
      richtung=false
29+
  else
30-
    else
30+
    turtle.turnRight()
31-
      turtle.turnRight()
31+
32-
      fGRABEN()
32+
    turtle.turnRight()
33-
      turtle.turnRight()
33+
    richtung=true
34-
      richtung=true
34+