You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
559 B

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)