JimmahDean
How can I detect if my app is being run on a VM?
it's generally assumed that the people we're helping are either not smart enough to run a vm, or smart enough to know the potential problems with vm's. it's not very common that people run it on vm's but it's happened enough that it would be helpful for the app to recognize it
8 replies
❔ Issues with for and foreach
what you're doing is adding the random number to the array at index
i
and then checking every one of the random numbers against the guess at index i
, so if your guesses are: 1,2,3,4,5 ... then 1 will only be printed if the first random number is 1, 2 will be printed if the first two random numbers are 2, 3 will be printed if the first 3 random numbers are 3, etc.. guesses 6-10 are completely ignored and if the random number generator generates 1 as the fourth random number, it doesn't check the first guess again.4 replies