ok, that’s what I thought I understood. Yes, it would be a useful feature. I think it was not that easy to do on our side, but I’ll double-check.
How to know the current coordinates of my explorer in the map ?
All the entity positions are given as x and y in the input
But how to know my own coordinates ?
the first entity given in the input is your explorer
So can I post code here that isn’t working? I can’t figure out what is doing wrong. Here is a snippet of code. Am I checking correctly for if there is a wall on one side of me?
if(x<myX): if(map[myX+1][myY]=="."): moveX = 1 elif(map[myX][myY+1]=="."): moveY = 1 elif(map[myX][myY-1]=="."): moveY = -1
It’s hard to tell with just an excerpt like this… But the first thing I see is that you are accessing your map with x first, while the inputs give it to you row by row. So if you store it as it come, you have to access it with y first. i.e map[myY][myX].
That did it. With the symmetry of most of the maps, it would work sometimes which is why I didn’t catch my mistake. Thanks. Already paste wood 3.
Is walking on a spawn for wanderers a valid move?