Dear all,
I have been using the code below successfully to get decent "random" results of 3:
Random3sub:
random w26
RandomOf3 = w26//3+1 'pick random route out of three
return
I also need a random number of two and the code below does not seem to generate anything else than one:
Random2sub:
random w25
RandomOf2 = w25//2+1 'pick random route out of two
return
I'm not good with these byte and word mathematics, so I don't really understand neither of the pieces of code above - copied them from somewhere. Can you help out, please?
Thank you for your time,
Edmunds
I have been using the code below successfully to get decent "random" results of 3:
Random3sub:
random w26
RandomOf3 = w26//3+1 'pick random route out of three
return
I also need a random number of two and the code below does not seem to generate anything else than one:
Random2sub:
random w25
RandomOf2 = w25//2+1 'pick random route out of two
return
I'm not good with these byte and word mathematics, so I don't really understand neither of the pieces of code above - copied them from somewhere. Can you help out, please?
Thank you for your time,
Edmunds