Random Scrambler

Well, this entry is certainly well within regulations, since even including ‘}’ lines, it’s still only 25 lines. Kinda simplistic, I know, but it’s the first thing I came up with.

tiles = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
_root.createEmptyMovieClip("artist", 1);
function randomize() {
    for (i=0; i<=9; i++) {
        for (j=0; j<=9; j++) {
            tiles*[j] = random(3);
        }
    }
    _root.artist.clear();
    for (i=0; i<=9; i++) {
        for (j=0; j<=9; j++) {
            _root.artist.moveTo(i*40, j*40);
            _root.artist.beginFill(0xBBC9FF, 50*tiles*[j]);
            _root.artist.lineTo(i*40+40, j*40);
            _root.artist.lineTo(i*40+40, j*40+40);
            _root.artist.lineTo(i*40, j*40+40);
        }
    }
}
randomize();
function onEnterFrame() {
    while (_root.tiles[Math.floor(_root._xmouse/40)][Math.floor(_root._ymouse/40)] == 1 || _root.tiles[Math.floor(_root._xmouse/40)][Math.floor(_root._ymouse/40)] == 2) {
        _root.randomize();
    }
}

Just move the mouse to see it scramble the tiles.