Agent Mining

Did you know you can have your agent mine and collect materials for you? For these challenges it will be really helpful to use LOOPS to repeat actions multiple times. 

Look for the green box on the block menu on the side

Look for steps in the challenge that need to happen over and over again. Anything you put in the green will be repeated multiple times.

Code for Sand Challenge
See how the green Loop block is used to repeat the three actions 10 times?

For the Coal challenge try using the AGENT COLLECT ITEM block of code to only pick up certain items. Be sure to remove the AGENT COLLECT ALL code first.

On your own:
Now write code to collect the emeralds AND the diamonds. You may need to add more lines of code to make it work correctly.