.
This commit is contained in:
parent
2a3eb817e5
commit
88c93dcce9
@ -4,42 +4,24 @@ tutel = require("lib.tutel")
|
|||||||
|
|
||||||
pos = tutel.getPos()
|
pos = tutel.getPos()
|
||||||
print("start x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
print("start x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
||||||
for i=1,10 do
|
for i=1,50 do
|
||||||
rand = math.random(1,4)
|
rand = math.random(1,6)
|
||||||
|
|
||||||
if rand == 1 then
|
if rand == 1 then
|
||||||
write("forward ")
|
|
||||||
tutel.forward()
|
tutel.forward()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
elseif rand == 2 then
|
elseif rand == 2 then
|
||||||
write("back ")
|
|
||||||
tutel.back()
|
tutel.back()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
elseif rand == 3 then
|
elseif rand == 3 then
|
||||||
write("left ")
|
|
||||||
tutel.left()
|
tutel.left()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
elseif rand == 4 then
|
elseif rand == 4 then
|
||||||
write("right ")
|
|
||||||
tutel.right()
|
tutel.right()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
elseif rand == 5 then
|
elseif rand == 5 then
|
||||||
write("up ")
|
|
||||||
tutel.up()
|
tutel.up()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
elseif rand == 6 then
|
elseif rand == 6 then
|
||||||
write("down ")
|
|
||||||
tutel.down()
|
tutel.down()
|
||||||
pos = tutel.getPos()
|
|
||||||
print("x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. pos["r"])
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
print(textutils.serialize(tutel.getPos()))
|
||||||
|
|
||||||
|
|
||||||
--print("start x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. r)
|
--print("start x: " .. pos["x"] .. " y: " .. pos["y"] .. " z: " .. pos["z"] .. " r: " .. r)
|
||||||
|
Loading…
Reference in New Issue
Block a user