Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --@Author: Zach Combs aka TehNoiseBomb
- --@Version: 1.1
- local inputs = {...}
- local east = ... --boolean flag passed into the function determining if the turtle is facing east(true) or west(false)
- --This code is mostly self-explanatory
- --The turtle will move right one row when facing east and left one row when facing west
- if east then
- print("Moving to next row... (EAST)")
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- print("Moving to next row... (WEST)")
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- --Return the opposite of the east flag
- return not east
Add Comment
Please, Sign In to add comment