Drag and Drop Dilemma

HI all,

I want to create a ‘matchstick game’ - i.e. “move 2 matchsticks to do… blah”.

I know that I will need to have the matchsticks in a position, and allow the user to move them around (using drag-drop).
I think I will also need invisible ‘holders’ that the matchsticks can be dropped onto.

My problem is: How do I set the code so it is general enough so you can pick up any match stick and place it on any holder.
I will also need to detect when the answer has been solved.

Hope you can help, Andy