from geopy.geocoders import Nominatim from .location import Location class Player(): def __init__(self): self.location = None def set_location_with_query(self, query): loc = Nominatim(user_agent="GetLoc") getLoc = loc.geocode(query) self.location = Location(getLoc.latitude, getLoc.longitude) def set_location(self, location): self.location = location def get_location(self): return self.location def cooldown_to(self, location): return self.location.get_cooldown(location)