I am working on a sketch based on Example 10-10 from the Learning Processing book if anyone is familiar with it. My version creates a number or randomly positioned ellipses. An ellipse is also created at the cursor position. When the ellipse at the cursor touches a random ellipse, it should change color. The problem is that it only works with one of the random ellipses.
The stinker is that if I replace line 23 with:
if (circle.intersect(randC[0]) || circle.intersect(randC[1]) || circle.intersect(randC[2])) {
it works how I want it to, the cursor ellipse changes color when it touches any of the random ellipses. Any suggestions would be greatly appreciated. Thanks!