Bug: initial waypoint index -1

Found an instance in which the first turn console input gives an initial waypoint index of -1 for pods 3 and 4.

Coders Strike Back
map=5408 2854 10309 3387 11206 5447 7247 6644

console at start of game:
5408 2854
10309 3387
11206 5447
7247 6644
5570 1363 0 0 -1 1
5246 4345 0 0 -1 1
5462 2357 0 0 -1 -1
5354 3351 0 0 -1 -1

I can’t reproduce…

  • Can you tell me which league are you in?
  • Are you player 1 or player 2?
  • Are you 100% sure that you’re not printing the angle? (yes, I have to ask… :slight_smile: )

Hi Maxime,

Sorry for the slow response. Apparently I’m not very good at checking my inbox!

I tried again to reproduce this bug myself, and was also unable to. I tried as both players, but I can’t remember which I was when I first reported it (or who the opponent was). For what it’s worth, when I saw the bug it was consistent. I probably replayed that match a couple dozen times before I figured out why my code was crashing (I wasn’t prepared for a waypoint index < 0).

I’m certain that I wasn’t printing the angle, though! The “console at start of game” that I posted was a direct print of the inputs - once I figured out what was crashing my code I just modified it to print the inputs directly to the error console to capture it for the report. That printout isn’t any of my variables, it’s just straight copypaste of Console.Error.Writeline(Console.ReadLine()) from the initialization.

At any rate, thanks for taking a look! I’ll keep an eye out for a recurrence in the future.

I have actually seen -1 as next waypoint too. As far as I know, this happens, when the other code has crashed. The player is eliminated from the game, and apparently this sets their next checkpoint to -1. Being unprepared for negative values can easily make your code crash too…