summaryrefslogtreecommitdiff
path: root/src/common/mt_rand.h
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-08-29 20:43:53 -0400
committerMadCamel <madcamel@gmail.com>2009-08-29 20:45:59 -0400
commit837194519b2be29aa7665828e4d7cb8035fe1c3b (patch)
tree6aefce861fe537c58a585c5ec6e353331891e1ba /src/common/mt_rand.h
parentde294e7c7d5ccf129eea3ce45c8023fa7b6d371d (diff)
downloadtmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.gz
tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.bz2
tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.tar.xz
tmwa-837194519b2be29aa7665828e4d7cb8035fe1c3b.zip
Converted to Mersenne Twister for random.
Randomerer! Also: Fixed a security problem. Can you find it?
Diffstat (limited to 'src/common/mt_rand.h')
-rw-r--r--src/common/mt_rand.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/mt_rand.h b/src/common/mt_rand.h
new file mode 100644
index 0000000..07f6ef0
--- /dev/null
+++ b/src/common/mt_rand.h
@@ -0,0 +1,8 @@
+#ifndef __mt_rand_h
+#define __mt_rand_h
+
+void mt_seed(unsigned long seed);
+unsigned long mt_reload(void);
+unsigned long mt_random(void);
+
+#endif /* __mt_rand_h */