With the code above, I intended to get a rectangle, in the rectangle i wanted to show a random number between 0 and 5. I wanted a new rectangle with a random number to appear after the old number was shown for a second.
Also I wanted this to happen 9 times.
My problem is, that the loop does not end if I do not stop the sketch, althoug the counter variable x does not get bigger than 9, the loop does not stop, but starts over with the counter variable reset to 1. Perhaps that has something to do with the looping of draw.
My second problem is, that I don't know how to display every rectangle with the random number for a second, I tried it by using an if-condition, that only draws the rectangel with the number when the value of millis () is dividable by1000 with no remainder, but this does not seem to work in the way I intended it to.
If somebody could explain me why the above code does not work and make any suggestion how I could get it working, I would be very thankful.
I am a complete beginner with Processing, so I might miss something very obvious,
Thanks in advance,
Millimanie