1 <div class="statement-body">
3 <div class="statement-section statement-goal">
5 <span class="icon icon-goal"> </span>
8 <div class="statement-goal-content">
9 Don't get destroyed by the troll.
13 <div class="statement-section statement-rules">
15 <span class="icon icon-rules"> </span>
18 <div class="statement-rules-content">
19 If you have stones, shoot <const>1</const> or more of them.
21 If you don't have stones, shoot <const>0</const> exactly.
24 <div class="statement-section statement-warning">
26 <span class="icon icon-warning"> </span>
27 <span>Rule Evolution</span>
29 <div class="statement-warning-content">
30 The following ideas are still in flux, waiting for some
31 opinions. Please drop a word on the
32 <a href="https://www.codingame.com/contribute/view/507070b7925f661e2d2835c14f950b9d157e">
36 <a href="https://forum.codingame.com/t/troll-vs-castles-brainstorm/184827?u=jbm">
41 Is it even worth publishing? can the problem be totally solved?
44 More maps? (a map is a {road length} × {initial stone count} pair)
47 Leagues? I could conceive the referee being permissive
48 (allow 0 stones thrown) in the first one, and then strict.
51 Fog of war? (see only troll position, not enemy throw/stones left)
54 <strong>variable</strong> for of war? (seeing enemy stones
55 is a boolean decided randomly as part of the map?
58 alternative fog of war? (seeing enemy stones only when
59 troll is close to us?)
62 Praise for my artistic skillz
70 <div class="statement-victory-conditions">
71 <div class="icon victory"></div>
73 <div class="title">Victory Condition</div>
74 <div class="text">Your opponent loses.</div>
77 <div class="statement-lose-conditions">
78 <div class="icon lose"></div>
80 <div class="title">Defeat Condition</div>
82 <li>The troll reaches your castle.</li>
83 <li>When no player has stones left, the troll is closer to your castle.</li>
87 <div class="statement-section statement-protocol">
89 <span class="icon icon-protocol"> </span>
90 <span>I/O Protocol</span>
92 <div class="statement-protocol-content">
93 Just read the sample code. You can figure this out.
95 You're currently allowed the default SDK timings. I think it's
96 one second for the first turn and 50 ms then, but don't
100 <div class="statement-section statement-expertrules">
102 <span class="icon icon-expertrules"> </span>
103 <span>Expert rules</span>
105 <div class="statement-expert-rules-content">
107 The following maps are currently available and randomly yet
108 extremely fairly (you wouldn't believe the effort that went
109 into this) chosen uniformly at random among the following:
112 <tr><th>Road length</th><th>Stones</th></tr>
113 <tr><td><const>6</const></td><td><const>15</const></td></tr>
114 <tr><td><const>6</const></td><td><const>30</const></td></tr>
115 <tr><td><const>14</const></td><td><const>30</const></td></tr>
116 <tr><td><const>14</const></td><td><const>50</const></td></tr>
119 As with anything in this <em>draft</em> statement, this
120 is <strong>subject to change without notice</strong>. Why do
121 you think they're provided in the game input?
124 You can also override them via game
125 settings <tt>roadLength</tt> and <tt>initialStones</tt>.
129 <div class="statement-section statement-protocol">
131 <span class="icon icon-protocol"> </span>
132 <span>Change Log</span>
135 I'm not maintaining the full changelog here anymore as the
136 <a href="https://troll.desast.re/troll.git">game's source
137 repository</a> is now publicly available. I'll just make note
138 of the single latest change, so you can know how far behind you
139 were lagging. Patches welcome, BTW.
142 This draft's last change is:
144 game parameters can be overridden.
148 <div class="statement-story-background">
149 <div class="statement-story"
150 style="position: relative; min-height: min-content">
151 <div class="story-text">
152 <div style="text-align: center">
153 “Trolls simply detest the very sight of dwarves (uncooked).”
155 <div style="text-align: right">
156 — J.R.R. Tolkien, <i>The Hobbit</i>
159 <div class="story-text">
161 Based on an involuntary suggestion by
162 <span class="card" cg-codingamer-card-popup=""
163 userid="user.codingamer.userId">
165 href="/profile/dbfa96e0ac9b77a3db679628f27224ae8509333"
166 title="Zaap38">Zaap38</a>
168 on the #Fr channel. The original appears to be by
169 <a href="http://andre.lovichi.free.fr/teaching/ea/2015-2016/cours/troll/Trolls_et_chateaux.pdf">
170 Romain André-Lovichi