Oh, and the battle itself? Well, I think my problem is this:
Either I can use a hash (key = name, value = list ( stock, shown )) or else a 2-d array (0 value is name, 1 value is stock, 2 value is shown).
If I use a hash, I need to sort the whole goddamn ball of wax whenever I want to see it sorted. On the up side, since I'll be going through that list fairly often, I can locate duplicates then, and just add new cards onto the bottom with push.
If I use an array, then I'm going to have to be able to *add* to the array (that is, add more to it, because I only know the width of the final array, not the length). I don't know if you can use push with an array, but for some reason I don't think you can. This bears much further investigation.