M&M Challenge

Can you get the pacman to eat all of the M&Ms. Start by using the buttons to define your strategy for eating all of the M&Ms in as few steps as possible.

Now change the mystuff procedure to eat the whole screen full of M&Ms with the push of a button. Your goal is to have it eat the M&Ms in a as few steps as possible, using the fewest commands you can. First try the pattern that is generated with "setup 1", then work your way to setup2 and setup3.

Commands you might need to know: