When you submit more than one command in a turn, you don’t get an error, but the received input gets increasingly wrong.
(This was especially frustrating since there was no error shown, so I thought that it was fine to send multiple commands and everything after the first just gets discarded.)
Inputs you’re receiving aren’t wrong. The thing is, each line you output represents a turn for the server which then sends you back the inputs. The server doesn’t know if you output several lines at once, neither if you read inputs or not and it actually doesn’t care. So if you print N lines, you have to ignore inputs for the following N-1 turns.
Technically you can send 8 lines (7 HOLD and a FIRE at the right index) then ignore the next 7 turns before sending 8 new lines and so on.
Ah! That makes a lot more sense, actually. Thanks for the explanation!
On a similar topic, does the game explain the actual cooldown that happens (only one shot before any turn) anywhere or do we have to figure that out ourselves? (I’m asking because I’m wondering if that “figuring out how the problem behaves” is a desired part of the games or if it’s just missing in the descriptions - it’s also present in other games here, and usually programming challenges are pretty clear on the problem outlines.)
The cooldown is around 6 positions for the ship to move. But in your Solution, the cooldown shouldn´t matter, because it´s not relevant.
Hope to help you (sorry for the desolat english)