Added a bug fix to getNextEnemy

There was a problem with it walking off the edge of the result