Im dumb please help

I have but one very dumb question, how do you go about getting all the coordinates on the enemy’s side of the board? I mean, I used a for loop and checked if the coordinate was in bounds and the y was greater than 13, but is there a more efficient way to do this?

If you’re looking for something simple, I believe the starter algo has code for getting the bottom half of the map (you can just tweak it to get the top half). I believe this’ll look quite similar to what you already have though, as what you have should return the correct coordinates.

Thanks, but what if I want to find the locations in the top of the map only once? I don’t really want to waste time finding the locations again.

Great idea! Hard code them in to algo with this site: https://code-bullet.github.io/Handy-Terminal-Position-Designer-Matrix-Thing/terminal%20designer/

Just press all the locations and hit “p” to get a list of all of them. Copy that into a member variable of your algo class and you can avoid computing it altogether.

1 Like

Thanks!
wow, that took a long time