I cannot help but notice...after I have started developing my math game (and gave it to beta-testers after constantly tweaking it, and I am still not done!) that my use of java.util.Random
and its method nextInt()
casted to double may not be the reliable saviour class I was looking for. Is it for generating random numbers for applications like mine? //The point of this app is to make an arithmetic game that is challenging for ALL PEOPLE and lets you solve problems with both integer and floating-point arguments. The highest number my program generates is a 6-digit number, and that is because of some different logic I have used for the Human Calculator (highest level) difficulty, namely for the division problems. I was thinking about using Mersenne twister algorithm, but I think the algorithm used by java.util.Random
is something like this: http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#next%28int%29 .
Also, I would like to know if it would be recommended that I use something like new java.util.Random(System.currentTimeMillis())