Meh. My previous message hasn't been sent and was deleted on refresh...
@vee41: I'll try that, but I would prefer to understand what I'm doing. Thanks, though, it could be interesting.
@Bluehardt: been there. I think the trick of the "string to generate randomness" is a little bit too much, though. Did the same thing with the Array value at (X,Y) is (Int(random(4)) and the random integer determines the color.
I wonder if adding a Z-axis to my array could help if I do this:
the value at (X,Y,2) is 0 on start of layout.
Then, for each element of the array, I compare the value with the previous, the next, the one above and the one below (so I compare (X,Y) with (X-1,Y), (X+1,Y), (X,Y-1) and (X,Y+1). If the value at (X,Y) and any of those is the same, I add 1 on (X,Y,2).
That way, I could trigger events if Z>=3...