Board Thread:Questions and Answers/@comment-1490123-20141201032447/@comment-14600979-20141201044601

Depends how you handle your "walls" I would think.

If it can be done from a map array, you could just find the nearest tile coordinates and say that's where the enemy is, and the nearest tile and its coordinates for the player, and just check the tiles between them.