Boss timed out. Reported by @Snef
[troll.git] / config / statement_en.html
index edffecf..f6afd2d 100644 (file)
          <div class="title">Map Input</div>
          <div class="text">
            <p>
          <div class="title">Map Input</div>
          <div class="text">
            <p>
-             Your first line of input contains three space-separated
+             This section's HTML gets messed up somewhere in the SDK
+             pipeline.  <a href="https://forum.codingame.com/t/misleading-html-in-the-sdk-skeleton/184828/8?u=jbm">I reported it there;</a> and there
+             you'll be able to find a readable representation of this
+             block.  Sorry about the inconvenience&hellip;
+           </p>
+           <p>
+             Your first line of input contains five space-separated
              parameters:
              parameters:
-             <var>roadLength</var> <var>initialStones</var> <var>seed</var>
+             <var>roadLength</var> <var>initialStones</var>
+             <var>gameSeed</var> <var>gameSide</var>
+             <var>reserved</var>
            </p>
            <dl style="margin: 1em;">
              <dt>roadLength</dt>
            </p>
            <dl style="margin: 1em;">
              <dt>roadLength</dt>
                algorithms, and you're encouraged to do the same!  See
                examples section below for simple ways to achieve that.
              </dd>
                algorithms, and you're encouraged to do the same!  See
                examples section below for simple ways to achieve that.
              </dd>
+             <dt>gameSide</dt>
+             <dd style="margin-left: 6em;">
+               which side you're on, as <const>-1</const>
+               or <const>1</const>.  It's not supposed to make a
+               difference to how you handle the rest of the game, but
+               you can XOR it to your <code>gameSeed</code> to have a
+               (reproducible) random that doesn't mecessarily draw
+               when it plays against itself.
+             </dd>
+             <dt>reserved</dt>
+             <dd style="margin-left: 6em;">
+               reserved for future use, ignore for now
+             </dd>
            </dl>
          </div>
        </div>
            </dl>
          </div>
        </div>
        </div>
      </div>
    </div>
        </div>
      </div>
    </div>
+   <div class="statement-section statement-examples">
+     <h2>
+       <span class="icon icon-example">&nbsp;</span>
+       <span>Proper RNG seeding examples</span>
+     </h2>
+     <table>
+       <tr>
+         <th style="border-bottom: 2px dashed #f2bb13;">Language Family</th>
+         <th style="border-bottom: 2px dashed #f2bb13;">Sample</th>
+       </tr>
+       <tr>
+         <td style="border-bottom: 1px dashed #f2bb13;">JVM</td>
+         <td style="border-bottom: 1px dashed #f2bb13;"><code>
+             long mySecretSalt = 0x4242424242424242L;<br>
+             Random random = new Random(gameSeed ^ gameSide ^ mySecretSalt);
+         </code></td>
+       </tr>
+       <tr>
+         <td style="border-bottom: 1px dashed #f2bb13;">C, C++, Perl&hellip;</td>
+         <td style="border-bottom: 1px dashed #f2bb13;"><code>
+             srand(gameSeed ^ gameSide ^ 0xdeadb33f);<br>
+             std::srand(gameSeed ^ gameSide ^ 12345);<br>
+             srand( $gameSeed ^ $gameSide ^ 0xCAFE_BABE );
+         </code></td>
+       </tr>
+       <tr>
+         <td style="border-bottom: 1px dashed #f2bb13;">Other</td>
+         <td style="border-bottom: 1px dashed #f2bb13;">Unachievable until proven otherwise</td>
+       </tr>
+     </table>
+   </div>
    <div class="statement-section statement-expertrules">
      <h2>
        <span class="icon icon-expertrules">&nbsp;</span>
    <div class="statement-section statement-expertrules">
      <h2>
        <span class="icon icon-expertrules">&nbsp;</span>