Skip to content

Instantly share code, notes, and snippets.

@thomasdunn
Last active April 1, 2019 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasdunn/c1851cd5cf3068fc556b5e72adb529f6 to your computer and use it in GitHub Desktop.
Save thomasdunn/c1851cd5cf3068fc556b5e72adb529f6 to your computer and use it in GitHub Desktop.
For use in JUDO5
function main() {
var size = 10;
var width = getDrawingWidth() / size;
var height = getDrawingHeight() / size;
setBackgroundColor(white);
while (true) {
setColor(black);
for (var x = 0; x < width; x++) {
for (var y = 0; y < height; y++) {
if (randomInt(2) > 0) {
fillRectangle(x * size, y * size, size, size);
}
}
}
delay(.1);
setColor(white);
fillRectangle(0, 0, getDrawingWidth(), getDrawingHeight());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment