X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/a78210b2e4295eaf8dee8215d4ffe5e062b4efb3..67375eefceac8e1ff648bc76f25a450a3143535f:/src/main/java/com/codingame/game/Player.java diff --git a/src/main/java/com/codingame/game/Player.java b/src/main/java/com/codingame/game/Player.java index 63f9e50..79d5aeb 100644 --- a/src/main/java/com/codingame/game/Player.java +++ b/src/main/java/com/codingame/game/Player.java @@ -1,6 +1,7 @@ package com.codingame.game; import java.util.List; +import java.util.Random; import java.util.regex.Pattern; import java.util.Scanner; @@ -22,9 +23,10 @@ public class Player extends AbstractMultiplayerPlayer { } // same-typed positional parameters… a disaster waiting to happen - void gameInit(int roadLength, int initialStones, long seed) { - sendInputLine(String.format("%d %d %d", - roadLength, initialStones, seed)); + void gameInit(int roadLength, int initialStones, long seed, long salt) { + sendInputLine(String.format("%d %d %d %d %d", + roadLength, initialStones, seed, + model.getMultiplier(), salt)); } void sendGameTurn() { @@ -59,7 +61,7 @@ public class Player extends AbstractMultiplayerPlayer { catch (NoSuchElementException e) { type = Action.Invalid; return; } s.useDelimiter(eol); - if (s.hasNext(rest)) messageString = s.next(rest); + if (s.hasNext(rest)) messageString = s.next(rest).trim(); else messageString = ""; type = Action.Throw; }