.
This commit is contained in:
parent
8848290cae
commit
c811a2067d
@ -26,6 +26,8 @@ local copyList = {
|
|||||||
[18] = "/brulijam/t-path-miner.lua",
|
[18] = "/brulijam/t-path-miner.lua",
|
||||||
[19] = "/brulijam/lib/tutel.lua",
|
[19] = "/brulijam/lib/tutel.lua",
|
||||||
[20] = "/brulijam/t-fiboMiner.lua",
|
[20] = "/brulijam/t-fiboMiner.lua",
|
||||||
|
[21] = "/brulijam/tutelMoveTest.lua",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
42
src/brulijam/tutelMoveTest.lua
Normal file
42
src/brulijam/tutelMoveTest.lua
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
basic = require("lib.basic")
|
||||||
|
tutel = require("lib.tutel")
|
||||||
|
|
||||||
|
write("x: ")
|
||||||
|
x = read()
|
||||||
|
write("y: ")
|
||||||
|
y = read()
|
||||||
|
write("z: ")
|
||||||
|
z = read()
|
||||||
|
write("r (S=0,W=1,N=2,E=3):")
|
||||||
|
r = read()
|
||||||
|
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
for i=1,20 do
|
||||||
|
rand = math.random(1,6)
|
||||||
|
|
||||||
|
if rand == 1 then
|
||||||
|
print("forward")
|
||||||
|
x,y,z,r = tutel.forward(x,y,z,r)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
elseif rand == 2 then
|
||||||
|
print("back")
|
||||||
|
x,y,z,r = tutel.back(x,y,z,r)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
elseif rand == 3 then
|
||||||
|
print("up")
|
||||||
|
y = tutel.up(y)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
elseif rand == 4 then
|
||||||
|
print("down")
|
||||||
|
y = tutel.down(y)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
elseif rand == 5 then
|
||||||
|
print("left")
|
||||||
|
r = tutel.left(r)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
elseif rand == 6 then
|
||||||
|
print("right")
|
||||||
|
r = tutel.right(r)
|
||||||
|
print("x: " .. x .. " y: " .. y .. " z: " .. z .. " r: " .. r)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user