You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
333 B

local robot = require("robot")
return {
forward = function(n)
if not n then n = 1 end
for _ = 1, n do
while not robot.forward() do end
end
end,
back = function(n)
if not n then n = 1 end
for _ = 1, n do
while not robot.back() do end
end
end,
}