I need some help streamlining or condensing the code in the file attached. I know it can be done, but try as I might, as soon as I change it it starts screwing up.
I need to be able to keep the code doing what it is doing at the moment (clicking on a dot, and then drawing a line from the start point to that dot), but I need to be able to do this for far more than just 3 dots, and I know that if I was to use my method of making this work, my code will end up being massive.
So far, I've tried using variables in the drawLine function, but everytime I add one, loses the co-ordinates it needs to draw to.
Also, once I'm done, I'd like to be able to make whichever dot is clicked, the new starting position for the next click, but that I'll tackle in a new thread, I think.