With the addition of a custom onstatechange function, this demo
turns the drag 'n' drop interface into a simple picture-matching game.
Arrange the icons below into matched pairs, using the mouse or keyboard
to move them:
The form below shows the data after each change; the state string is split into an array, then alternate members of that array are tested against their neighbour, losing points if they don't match. The game is complete when the score is 14/14