Document length/distance duality and impending doom
[troll.git] / config / statement_en.html
1 <div class="statement-body">
2    <!-- GOAL --> 
3    <div class="statement-section statement-goal"> 
4      <h2> 
5        <span class="icon icon-goal">&nbsp;</span> 
6        <span>The Goal</span> 
7      </h2> 
8      <div class="statement-goal-content"> 
9        Don't get destroyed by the troll.
10      </div>
11    </div> 
12    <!-- RULES --> 
13    <div class="statement-section statement-rules"> 
14      <h2> 
15        <span class="icon icon-rules">&nbsp;</span> 
16        <span>Rules</span> 
17      </h2> 
18      <div class="statement-rules-content">
19        You <em>have</em> to shoot at least <const>1</const> stone per
20        turn if you have any left.
21      </div> 
22    </div>
23    <div class="statement-section statement-warning">
24      <h2>
25        <span class="icon icon-warning">&nbsp;</span>
26        <span>Breaking Change</span>
27      </h2>
28      <p>
29        The <var>roadLength</var> game input variable used to be the
30        cardinal number of positions the troll could be in.  That's the
31        way it was presented in the original game, but I leaned more
32        towards distances to make the I/O protocol easier on beginners.
33        So it's currently inconsistent.
34      </p>
35      <p>
36        This is going to change in the following days to be a distance
37        everywhere, more in line with the protocol's other measures.
38        Not to mention being somewhat more consistent with the variable
39        name.  Thanks
40        <a href="https://www.codingame.com/profile/c4a50746f425cb125f77487aaf51350c7258821">
41          @Snef
42        </a>
43        for reminding me of this.
44      </p>
45      <p>
46        If you used this variable, I suggest you temporarily used one
47        of these workarounds so you don't get bit by the upcoming
48        change:
49      </p>
50      <table>
51        <tr><th>Former use</th><th>As a</th><th>Try this</th></tr>
52        <tr>
53          <td><pre>roadLength - 1</pre></td>
54          <td><pre>distance to opponent</pre></td>
55          <td><pre>roadLength & (~1)</pre></td>
56        </tr>
57        <tr>
58          <td><pre>roadLength</pre></td>
59          <td><pre>number of troll states</pre></td>
60          <td><pre>roadLength | 1</pre></td>
61        </tr>
62        <tr>
63          <td><pre>roadLength + 1</pre></td>
64          <td><pre>I have no idea</pre></td>
65          <td><pre>(roadLength + 1) & (-1)</pre></td>
66        </tr>
67      </table>
68    </div>
69    <div class="statement-section statement-warning">
70      <h2>
71        <span class="icon icon-warning">&nbsp;</span>
72        <span>Rule Evolution</span>
73      </h2>
74      <div class="statement-warning-content">
75        The following ideas are still in flux, waiting for some
76        opinions.  Please drop a word on the
77        <a href="https://www.codingame.com/contribute/view/507070b7925f661e2d2835c14f950b9d157e">
78          contribution's page
79        </a>
80        or
81        <a href="https://forum.codingame.com/t/troll-vs-castles-brainstorm/184827?u=jbm">
82          on the forum
83        </a>
84        <ul>
85          <li>
86            Is it even worth publishing? can the problem be totally solved?
87          </li>
88          <li>
89            More maps? (a map is a {road length} × {initial stone count} pair)
90          </li>
91          <li>
92            Leagues? I could conceive the referee being permissive
93            (allow 0 stones thrown) in the first one, and then strict.
94          </li>
95          <li>
96            Fog of war? (see only troll position, not enemy throw/stones left)
97          </li>
98          <li>
99            <strong>variable</strong> for of war? (seeing enemy stones
100            is a boolean decided randomly as part of the map?
101          </li>
102          <li>
103            alternative fog of war? (seeing enemy stones only when
104            troll is close to us?)
105          </li>
106          <li>
107            Praise for my artistic skillz
108          </li>
109          <li>
110            Other remarks?
111          </li>
112        </ul>
113      </div>
114    </div>
115    <div class="statement-victory-conditions">
116      <div class="icon victory"></div>
117      <div class="blk">
118        <div class="title">Victory Condition</div>
119        <div class="text">Your opponent loses.</div>
120      </div>
121    </div>
122    <div class="statement-lose-conditions">
123      <div class="icon lose"></div>
124      <div class="blk">
125        <div class="title">Defeat Condition</div>
126        <ul>
127          <li>The troll reaches your castle.</li>
128          <li>When no player has stones left, the troll is closer to your castle.</li>
129        </ul>
130      </div>
131    </div>
132    <div class="statement-section statement-protocol">
133      <h2>
134        <span class="icon icon-protocol">&nbsp;</span>
135        <span>I/O Protocol</span>
136      </h2>
137      <div class="statement-protocol-content">
138        Just read the sample code.  You can figure this out.
139      </div>
140    </div>
141    <div class="statement-section statement-expertrules">
142      <h2>
143        <span class="icon icon-expertrules">&nbsp;</span>
144        <span>Maps</span>
145      </h2>
146      <div class="statement-expert-rules-content">
147        <p>
148          The following maps are currently available and randomly yet
149          extremely fairly (you wouldn't believe the effort that went
150          into this) chosen uniformly at random among the following:
151        </p>
152        <table>
153          <tr><th>Road length</th><th>Stones</th></tr>
154          <tr><td><const>7</const></td><td><const>15</const></td></tr>
155          <tr><td><const>7</const></td><td><const>30</const></td></tr>
156          <tr><td><const>15</const></td><td><const>30</const></td></tr>
157          <tr><td><const>15</const></td><td><const>50</const></td></tr>
158        </table>
159        <p>
160          As with anything in this <em>draft</em> statement, this
161          is <strong>subject to change without notice</strong>.  Why do
162          you think they're provided in the game input?
163        </p>
164      </div>
165    </div>
166    <div class="statement-section statement-protocol">
167      <h2>
168        <span class="icon icon-protocol">&nbsp;</span>
169        <span>Change Log</span>
170      </h2>
171      <ul>
172        <li>
173          Enforce the one-stone rule.  (that also fixed the legacy
174          buh&mdash;sorry people!  I put an easter egg in exchange)
175        </li>
176        <li>
177          Cutesy defeat animations.
178        </li>
179        <li>
180          Distinct castle sprites!
181        </li>
182        <li>
183          Terminate game when there are no more stones in sight.
184        </li>
185        <li>
186          More pretty. (SRLSLY)
187        </li>
188        <li>
189          No more void maps. (root cause: Java <const>%</const> on a
190          negative seed)
191        </li>
192      </ul>
193    </div>
194    <div class="statement-story-background">
195      <div class="statement-story"
196           style="position: relative; min-height: min-content">
197        <div class="story-text">
198          Based on an involuntary suggestion by
199          <span class="card" cg-codingamer-card-popup=""
200                userid="user.codingamer.userId">
201            <a class="pseudo"
202               href="/profile/dbfa96e0ac9b77a3db679628f27224ae8509333"
203               title="Zaap38">Zaap38</a>
204          </span>
205          on the #Fr channel.  The original appears to be by
206          <a href="http://andre.lovichi.free.fr/teaching/ea/2015-2016/cours/troll/Trolls_et_chateaux.pdf">
207            Romain Andr&eacute;-Lovichi
208          </a>.
209        </div>
210      </div>
211    </div>
212 </div>