Please help me with this bug


#1
loop:
    flag = self.findFlag()
    enemy = self.findNearestEnemy()
    item = self.findNearestItem()
    if flag:
        # What happens when I find a flag?
        self.pickUpFlag(flag)
        
    elif enemy:
        # What happens when I find an enemy? 
        self.attack(enemy)
        
    elif item:
        # <item %>
        pos = item.pos
        a = pos.x
        b = pos.y
        self.moveXY(a, b)

#2

What is the problem you are seeing?


#3

i can not defeat all my enemies


#4

the life give can not defeat all enemy


#5

and sametime, he looks for item instead of attacking enemy


#6

Try getting more armor; you should be able to do it with somewhere around 400 health on this level.