home · contact · privacy
Improved (and simplified) pseudo-randomness.
[plomrogue] / src / misc.h
index fad27f6a51e890b18aa675a710f23f8c3aa4833a..bc3e274a5c2c3a181396a630f60f574123a2d889 100644 (file)
@@ -14,6 +14,12 @@ struct Map;
 
 
 
+/* Return 16-bit number pseudo-randomly generated via Linear Congruential
+ * Generator algorithm with some proven constants. Use instead of rand() to
+ * ensure portability of the same pseudo-randomness across systems.
+ */
+extern uint16_t rrand();
+
 /* Returns message: "Trouble in ".parent." with ".child."." (try_*() helper) */
 extern char * trouble_msg(char * parent, char * child);