That's because you're making the Random instance in the method, which causes it to return the same values when called in quick succession.(Ref from network)
Use
private static Random random = new Random((int)DateTime.Now.Ticks);
then use random.nextDouble() to get the random number.
No comments:
Post a Comment