Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pos = 0
- function selectConcrete()
- for i = 1, robot.inventorySize()/2 do
- if robot.count(i*2-1) ~= 0 then
- robot.select(i*2-1)
- break
- end
- end
- end
- function selectGlass()
- for i = 1, robot.inventorySize()/2 do
- if robot.count(i*2) ~= 0 then
- robot.select(i*2)
- break
- end
- end
- end
- function swap()
- if pos == 0 then
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- pos = 1
- else
- robot.turnRight()
- robot.forward()
- robot.turnRight()
- pos = 0
- end
- end
- function pattern1()
- for i = 1, 15 do
- selectConcrete()
- robot.placeDown()
- robot.forward()
- end
- selectConcrete()
- robot.placeDown()
- end
- function pattern2()
- selectConcrete()
- robot.placeDown()
- robot.forward()
- for i = 1, 14 do
- selectGlass()
- robot.placeDown()
- robot.forward()
- end
- selectConcrete()
- robot.placeDown()
- end
- pattern1()
- swap()
- for i = 1, 14 do
- pattern2()
- swap()
- end
- pattern1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement