Skip to content

Instantly share code, notes, and snippets.

@zamfi
Created April 25, 2015 17:29
Show Gist options
  • Save zamfi/930945b1c2401e21f61c to your computer and use it in GitHub Desktop.
Save zamfi/930945b1c2401e21f61c to your computer and use it in GitHub Desktop.
var colors = ["red", "blue", "green", "yellow"];
var directions = [up, down, left, right];
while (remainingDots() > 0) {
directions[Math.floor(Math.random()*directions.length)]();
setColor(colors[Math.floor(Math.random()*colors.length)]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment