- Just read the sample code. You can figure this out.
-
- You're currently allowed the default SDK timings. I think it's
- one second for the first turn and 50 ms then, but don't
- quote me on this.
+
+ This place used to read: âJust read the sample code. You can
+ figure this out.â Here are the formalities for that
+ other part of the audience.
+
+
+
Map Input
+
+
+ Your first line of input contains three space-separated
+ parameters:
+ roadLength initialStones seed
+
+
+ - roadLength
+ -
+ distance between both castles, between 6
+ and 14.
+
+ - initialStones
+ -
+ number of stones a castle starts the day with,
+ between 0 and 50.
+
+ - gameSeed
+ -
+ the game's seed. The game AIs use it to provide you
+ with reproducible matches even when they use stochastic
+ algorithms, and you're encouraged to do the same! See
+ examples section below for simple ways to achieve that.
+
+
+
+
+
+
Turn Input
+
+
+ At each turn, you are provided with the following three
+ space-separated values:
+ trollDistance
+ stones
+ opponentStones
+
+
+ - trollDistance
+ -
+ distance between the troll and your castle
+
+ - stones
+ -
+ number of stones you have left
+
+ - opponentStones
+ -
+ number of stones your opponent has left
+
+
+
+
+
+
Turn Output
+
+
+ After having received your turn input, you are to output
+ a single integer stones: the number of stones
+ you wish to throw at the troll.
+
+
+ You may optionally provide a message you wish
+ your castle to yell at the troll or at your opponent.
+ Just append it to your output, being sure to separate it
+ with at least one space.
+
+
+
+
+
+
Timing Considerations
+
+
+ You're currently allowed the default SDK timings. I
+ think it's one second for the first turn and 50 ms
+ then, but don't quote me on this.
+
+
+