Skip to content
Snippets Groups Projects
Commit d846902a authored by David Bergström's avatar David Bergström
Browse files

Fix bug where distance is not defined

parent b7774565
No related branches found
No related tags found
No related merge requests found
from library import IDABot, Unit, UnitType, TypeData, Point2DI, PLAYER_SELF
from typing import Optional
Point2D.distance = lambda self, other: sqrt((self.x - other.x)**2 + (self.y - other.y)**2)
def has_addon(bot: IDABot, candidate: Unit, addon_type: UnitType):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment