Advertisement
Guest User

functions.lua

a guest
Feb 25th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function turnRobot(turnedLeft)
  2.   local penis = {}
  3.   local movedBlocks = 0
  4.   if (penis == 1)
  5.   then
  6.   robot.turnRight()
  7.   while(movedBlocks < 3) do
  8.   robot.swing(sides.front)
  9.   robot.forward(1)
  10.   movedBlocks = movedBlocks + 1
  11.   end
  12.   robot.turnRight()
  13.   turnRobot = 0
  14.   end
  15.  
  16.   if (penis == 0)
  17.   then
  18.   robot.turnLeft()
  19.   while( movedBlocks < 3) do
  20.     robot.swing(sides.front)
  21.     robot.forward(1)
  22.     end
  23.   robot.turnLeft()
  24.  turnRobot = 1
  25.   end
  26. return turnRobot;
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement