How do I beat level 7?
You can get past all the gates using the code below:
if(player.getColor()=='#f00')
player.setColor('#ff0');
else if(player.getColor()=='#ff0')
player.setColor('#0f0');
else
player.setColor('#f00');
Basically, it makes it so every time you hit Q, you change to the color of the next gate.
Green -> Red -> Yellow -> Green