Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
05-23-2011, 12:10 PM #1
- Join Date
- May 2011
- Thanked 0 Times in 0 Posts
Random() and Shuddle edits inconsistent when looped?
I have a few edits to java's shuffle and random() algorithms to see how changing the System.nanotime modifier to a constant would affect them... when you leave system.nanotime to a constant value, the output of util.collections.shuffle is the same, however when you put it into a loop (like below) the consistency disappears,
Am I failing to reset something in the loop? (am VERY new to java, please help!)
int count = 0;
while (seedL <= 30)
seedL = seedL + 1;
Deck = original;
NewRandom.x = seedL;
List<String> llist = Arrays.asList(Deck);
a note, NewRandom and Nocollections are my edits, seedL is linked to where system.nanotime was (x) and the deck is preprogrammed with 52 strings (each representing a "card" i.e. "9d")
Last edited by ericader; 05-23-2011 at 12:14 PM.