RE: LZ: Random Numbers


[Prev][Next][Index][Thread]

RE: LZ: Random Numbers



-> > huh? this is a little confusing for me, all i need is the code or
-> an > explanation (in moron terms) to produce a random number from 1-4
-> ! Random numbers are pretty complex... It might actually be SIMPLER
-> to search the rom dump.  When you type Rand() in BASIC, you're
-> calling an incredibly complex routine - else you wind up getting
-> numbers that aren't random at all.
-> BTW, there's a bug in Tetris w/ the piece-selection algorithm - on
-> occasion it will give you about 20 square blocks in a row!  This
-> demonstrates the importance of getting good random numbers...


Well you can do a semi-good one very simply, this is the same one that
Borland uses for all of their products ( C, Pascal, (C++??) ) I'm not
sure if C++ uses it.


A=A*(Any Number)+1


that's what they use, I think that the (Any Number) should be a prime.
That'l give you ok results.