View difference between Paste ID: 3kDDuRb1 and s4aZq2Ff
SHOW: | | - or go back to the newest paste.
1
while true do
2
 local action = math.random(1,6)
3
 
4
 
5
 if action == 1 then
6
  turtle.turnLeft()
7
 end
8
 
9
 if action == 2 then
10
  turtle.turnRight()
11
 end
12
 
13-
 if action == >= 3 and action <= 6 then
13+
 if action == 3 then
14
  local distance = math.random(1,5)
15
  for i = 1,distance do
16
   turtle.forward()
17
  end
18
 end
19
20
 if action == 4 then
21
  local distance = math.random(1,5)
22
  for i = 1,distance do
23
   turtle.forward()
24
  end
25
 end
26
27
 if action == 5 then
28
  local distance = math.random(1,5)
29
  for i = 1,distance do
30
   turtle.forward()
31
  end
32
 end
33
34
 if action == 6 then
35
  local distance = math.random(1,5)
36
  for i = 1,distance do
37
   turtle.forward()
38
  end
39
 end
40
end