Document length/distance duality and impending doom
authorJBM <jbm@codingame.com>
Thu, 21 May 2020 00:53:37 +0000 (02:53 +0200)
committerJBM <jbm@codingame.com>
Wed, 27 May 2020 14:53:54 +0000 (16:53 +0200)
PLAN.org
config/statement_en.html

index 8a51b39..ecf16c0 100644 (file)
--- a/PLAN.org
+++ b/PLAN.org
@@ -1,3 +1,6 @@
 * DONE links to contrib and forum
 * DONE document maps
 * DONE links to contrib and forum
 * DONE document maps
+* DONE document length/distance thingy
 * TODO debug rotating avatar
 * TODO debug rotating avatar
+* TODO easter egg for YannT
+meta^5 @YannT :: (a -> b) -> f1 (f2 (f3 a)) -> f1 (f2 (f3 b))
index 476de50..0102747 100644 (file)
        turn if you have any left.
      </div> 
    </div>
        turn if you have any left.
      </div> 
    </div>
+   <div class="statement-section statement-warning">
+     <h2>
+       <span class="icon icon-warning">&nbsp;</span>
+       <span>Breaking Change</span>
+     </h2>
+     <p>
+       The <var>roadLength</var> game input variable used to be the
+       cardinal number of positions the troll could be in.  That's the
+       way it was presented in the original game, but I leaned more
+       towards distances to make the I/O protocol easier on beginners.
+       So it's currently inconsistent.
+     </p>
+     <p>
+       This is going to change in the following days to be a distance
+       everywhere, more in line with the protocol's other measures.
+       Not to mention being somewhat more consistent with the variable
+       name.  Thanks
+       <a href="https://www.codingame.com/profile/c4a50746f425cb125f77487aaf51350c7258821">
+         @Snef
+       </a>
+       for reminding me of this.
+     </p>
+     <p>
+       If you used this variable, I suggest you temporarily used one
+       of these workarounds so you don't get bit by the upcoming
+       change:
+     </p>
+     <table>
+       <tr><th>Former use</th><th>As a</th><th>Try this</th></tr>
+       <tr>
+         <td><pre>roadLength - 1</pre></td>
+         <td><pre>distance to opponent</pre></td>
+         <td><pre>roadLength & (~1)</pre></td>
+       </tr>
+       <tr>
+         <td><pre>roadLength</pre></td>
+         <td><pre>number of troll states</pre></td>
+         <td><pre>roadLength | 1</pre></td>
+       </tr>
+       <tr>
+         <td><pre>roadLength + 1</pre></td>
+         <td><pre>I have no idea</pre></td>
+         <td><pre>(roadLength + 1) & (-1)</pre></td>
+       </tr>
+     </table>
+   </div>
    <div class="statement-section statement-warning">
      <h2>
        <span class="icon icon-warning">&nbsp;</span>
    <div class="statement-section statement-warning">
      <h2>
        <span class="icon icon-warning">&nbsp;</span>