Any idea why in the last line KR and KC is not the same as (row=3, col=19)

Kirk is moving LEFT (row=2, col=20)
Jetpack’s energy left: 1195
Control room not found yet
Standard Error Stream:
20 2
KC->20 KR->2
0R0L
Standard Output Stream:
LEFT
7/9
Game information:
Kirk is moving LEFT (row=2, col=19)
Jetpack’s energy left: 1194
Control room not found yet
Standard Error Stream:
19 2
KC->19 KR->2
DR00
Standard Output Stream:
DOWN
8/9
Game information:
Kirk is moving DOWN (row=3, col=19)
Jetpack’s energy left: 1193
Control room not found yet
Standard Output Stream:
RIGHT KR->2 KC->19

Everything is correct for me. Are you sure you don’t modify the values without really noticing ?

I modified nothing , I am just printing them each turn. May be i am missing something else, don’t know ?

Thanks for your help . it was misplaced else if