X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/7b8732a6aba5c34e24aa324a25e2fae37f7149a7..734e04c8106926949ce97c993e065c98f0fd25ed:/config/statement_en.html diff --git a/config/statement_en.html b/config/statement_en.html index b5f784b..a63199a 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -207,6 +207,37 @@ +
+

+   + Proper RNG seeding examples +

+ + + + + + + + + + + + + + + + + +
Language FamilySample
JVM + long mySecretSalt = 0x4242424242424242L;
+ Random random = new Random(gameSeed ^ gameSide ^ mySecretSalt); +
C, C++, Perl… + srand(gameSeed ^ gameSide ^ 0xdeadb33f);
+ std::srand(gameSeed ^ gameSide ^ 12345);
+ srand( $gameSeed ^ $gameSide ^ 0xCAFE_BABE ); +
OtherUnachievable until proven otherwise
+