Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local robot = require("robot")
- local functions = require("functions")
- rawget(getmetatable(o) or {}, "__ev")
- --[[local g = component.generator
- robot.select(2)
- g.untinsert()
- print(g.co())]]
- rmb = 1 -- Means Robot moved block
- turnedLeft = true -- Boolean that means at 1 that the robot turned left last 25 Blocks
- for i = 200,1,-1 do
- --Check when the Robot has moved 12 Blocks
- if (rmb % 12 == 0)
- then print("Es ist durch 12 teilbar")
- end
- if (rmb % 25 == 0)
- then turnedLeft = functions.turnRobot(turnedLeft)
- print(turnedLeft)
- end
- if robot.detect() == true
- then
- robot.swing(sides.front)
- robot.forward(1)
- print(rmb)
- else
- robot.forward(1)
- print(rmb)
- end
- rmb = rmb + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement