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