Created
March 2, 2019 10:55
-
-
Save thebitbrine/b0c44d8f347293dce462180dce28bf7b to your computer and use it in GitHub Desktop.
Bad random number generator for shuffling lists.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long BadRandom() | |
{ | |
List<char> Stack = new List<char>(); | |
char[] Array = DateTime.Now.Ticks.ToString().ToArray(); | |
Stack.Add(Array[int.Parse(Array.Last().ToString())]); | |
for (int i = 0; i < 17; i++) | |
{ | |
Array = DateTime.Now.Ticks.ToString().ToArray(); | |
Stack.Add(Array[int.Parse(Stack.ToArray().Last().ToString())]); | |
} | |
return long.Parse(string.Join("",Stack)) * DateTime.Now.Ticks; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment