<div class="title">Map Input</div>
<div class="text">
<p>
- Your first line of input contains 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…
+ </p>
+ <p>
+ Your first line of input contains five space-separated
parameters:
<var>roadLength</var> <var>initialStones</var>
<var>gameSeed</var> <var>gameSide</var>
- <var>reserved1</var> … <var>reservedN</var>
+ <var>reserved</var>
</p>
<dl style="margin: 1em;">
<dt>roadLength</dt>
(reproducible) random that doesn't mecessarily draw
when it plays against itself.
</dd>
- <dt>reserved<em>N</em></dt>
+ <dt>reserved</dt>
<dd style="margin-left: 6em;">
- one or more parameters, reserved for future use
+ reserved for future use, ignore for now
</dd>
</dl>
</div>
public class Player extends AbstractMultiplayerPlayer {
Model.Player model;
View.Player view;
- Random random = new Random();
@Override
public int getExpectedOutputLines() {
// same-typed positional parameters… a disaster waiting to happen
void gameInit(int roadLength, int initialStones, long seed) {
- int nReserved = random.nextInt(5);
- String reserved = "";
- while (nReserved --> 0) reserved += " 0";
- sendInputLine(String.format("%d %d %d %d%s",
+ sendInputLine(String.format("%d %d %d %d 0",
roadLength, initialStones, seed,
- model.getMultiplier(), reserved));
+ model.getMultiplier()));
}
void sendGameTurn() {