X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/a78210b2e4295eaf8dee8215d4ffe5e062b4efb3..734e04c8106926949ce97c993e065c98f0fd25ed:/config/statement_en.html?ds=inline diff --git a/config/statement_en.html b/config/statement_en.html index edffecf..a63199a 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -111,9 +111,11 @@
Map Input

- Your first line of input contains three space-separated + Your first line of input contains space-separated parameters: - roadLength initialStones seed + roadLength initialStones + gameSeed gameSide + reserved1reservedN

roadLength
@@ -133,6 +135,19 @@ algorithms, and you're encouraged to do the same! See examples section below for simple ways to achieve that. +
gameSide
+
+ which side you're on, as -1 + or 1. It's not supposed to make a + difference to how you handle the rest of the game, but + you can XOR it to your gameSeed to have a + (reproducible) random that doesn't mecessarily draw + when it plays against itself. +
+
reservedN
+
+ one or more parameters, reserved for future use +
@@ -192,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
+