Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local move = dofile("move.lua")
- local function getCurrentPos()
- return move.currentPos, move.currentHeading
- end
- local function printCurrentPos()
- local pos, heading = getCurrentPos()
- print("pos:", pos, " heading:", heading)
- end
- printCurrentPos()
- print("forward:", move:forward(2, true))
- printCurrentPos()
- print("up:", move:up(3, true))
- printCurrentPos()
- sleep(3)
- print("back:", move:back(2, true))
- printCurrentPos()
- print("turn left:", move:turnLeft(2))
- printCurrentPos()
- print("turn right:", move:turnRight(2))
- printCurrentPos()
- print("down:", move:down(3, true))
- printCurrentPos()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement