X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/b41b9823fbe2eed146db478fd5a1353bb558215c..21357ae2173926ec1eb908517ab7b1b3e9175ee5:/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 e73482a..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,8 +23,10 @@ public class Player extends AbstractMultiplayerPlayer { } // same-typed positional parameters… a disaster waiting to happen - void gameInit(int roadLength, int initialStones) { - sendInputLine(String.format("%d %d", roadLength, initialStones)); + 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() { @@ -58,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; }