Virtually everyone has Flash player already installed. Comparatively fewer people have Vassal installed or can be fussed to launch it.
In Flash using AS2 you can just set up a for-loop and do attachMovie 40 times into an array, then shuffle the array (once for each slot in the array, swap with a random slot). I figure AS3 is similar. There's no single best way to calculate scores that I'm aware of - Varies from game to game. If you go with Flash, geekmail me and we can trade ideas.
Thank you, this is exactly what I was looking for! If I have some time in the new few days I'll get some basic stuff setup.