Its hard to read your code. Can you please format it correctly by adding 3 backtick before and after the code or press the button that looks like </> at the top of the text editor.
The reason its not attacking is because all you called was self.findNearestEnemy() You need to make it look like the line on the top where it says enemy = self.findNearestEnemy()
Problem is that he goes to the top X and kills the munchkin and then he goes to the first X and back to the top one. By the time he gets to the bottom one the munchkin kills the other guy and then my guy kills him.