Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turnRobot(turnedLeft)
- local penis = {}
- local movedBlocks = 0
- if (penis == 1)
- then
- robot.turnRight()
- while(movedBlocks < 3) do
- robot.swing(sides.front)
- robot.forward(1)
- movedBlocks = movedBlocks + 1
- end
- robot.turnRight()
- turnRobot = 0
- end
- if (penis == 0)
- then
- robot.turnLeft()
- while( movedBlocks < 3) do
- robot.swing(sides.front)
- robot.forward(1)
- end
- robot.turnLeft()
- turnRobot = 1
- end
- return turnRobot;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement