Hello I am unsure how to assign an ID to a specific shape. The idea is that every mousePressed will draw a circle in a grid, and I want to be able to tell which circle was drawn 1st, 2nd, 3rd etc. This is because I want to draw a line segment between 2 specific circles I choose. But I’m not sure how to do this.
Perhaps someone could refer me to a handy library to use, or some other method of doing this? I had a thought of using images instead of shapes, but i still don’t know how to assign unique IDs.
For reference, this is an idea of the grid:
Much thanks!
Update: Problem solved with reference to https://processing.org/tutorials/arrays/.