We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I'm reading a csv file which looks roughly like the following:
Each row is a different playing card.
My question is this: I'd like to pick a few rows at random (ace of hearts, five of diamonds, three of spades) and load their respective fields into my program but I need to make sure that no duplicate cards show up.
How do I limit the choices of a random table entry so that it only chooses entries that haven't been chosen before?
The way I'm doing it just now is finding a random row in my table, setting an int to that random row number called randcard, Then, say I wanted to find the jpg name of randcard, I'd do:
String s = table.getString(3,randcard)
But the problem is how to then pull another random card (row) from the deck, ignoring the ones that can't still be in there.
I hope this makes sense, thanks for your time. James