Coders Strike Back - Puzzle Discussion


My guess is that you send two outputs per turn. One for each checkpoint. Your program then gets desynchronized from the input.


Hi everybody! I’m in Wood 2 League, language Java, and I have trouble with console output in the game. I don’t understand what are those 2 numbers in the output. I added 2 lines into the default code and debug output:

        int nextCheckpointDist = in.nextInt();
        int nextCheckpointAngle = in.nextInt();             
        System.err.println("Angl: " + nextCheckpointAngle);

In the “Game Information” as output of debug message there are unknown numbers in the 002-nd and 003-rd steps of the game. The 001-st step is ok, there is a correct angle (which is zero). Please explaine what are those numbers (1998 in 002-nd and 7318, 8047 in 003-rd step).
Upd: The numbers slightly veries at each launch of the test.


You removed two lines from the default code leading to a desynchronization of the input and output. All data sent in the input should be read, else, at turn n+1, you read data from turn n.


I didn’t remove any line, here is the whole code:

import java.util.;
import java.math.*;


  • This code automatically collects game data in an infinite loop.

  • It uses the standard input to place data into the game variables such as x and y.

    class Player {

    public static void main(String args[]) {
    Scanner in = new Scanner(;

     // game loop
     while (true) {
         int x = in.nextInt(); // x position of your pod
         int y = in.nextInt(); // y position of your pod
         int nextCheckpointX = in.nextInt(); // x position of the next check point
         int nextCheckpointY = in.nextInt(); // y position of the next check point
         int nextCheckpointDist = in.nextInt();
         int nextCheckpointAngle = in.nextInt();            
         // Write an action using System.out.println()
         // To debug: 
         System.err.println("Angl: " + nextCheckpointAngle);
         // Edit this line to output the target position
         // and thrust (0 <= thrust <= 100)
         // i.e.: "x y thrust"
         System.out.println(nextCheckpointX + " " + nextCheckpointY + " 99");



Maybe you didn’t do it intentionally but you’re missing the lines that read vx and vy. Try this: copy the part of the code you wrote, reset the code back to default, and paste it back in. Alternately, recreate the missing input lines using the problem description as a guide.


Thank you Community, that works. I didn’t pay attention to the Restore Code button. How did I erase two lines of code (with variables opponentY and opponentX)? Obviously tt’s some kind of mystery because I was very careful and wrote only necessary code.


cannot get the stupid, annoying hints to go away. I would love to be able to play this one, but I can’t concentrate with the tips constantly in the way and repeating the same thing over and over. smh


Hi everyone!
Just started with this.
When I output “BOOST” instead of the usual power integer, I get an error and lose.

Standard Output Stream:

13493 2017 ‘BOOST’
Game information:
invalid input. Expected ‘x y power’ but found ‘13493 2017 ‘BOOST’’

my JS line is print(nextCheckpointX, nextCheckpointY, “BOOST”)

Can you please point out what I’m doing incorrectly?


Leave off the quotes around the BOOST.