import search
import random
import math


ids = ["111111111", "111111111"]


class DroneProblem(search.Problem):
    """This class implements a medical problem according to problem description file"""

    def __init__(self, initial):
        """Don't forget to implement the goal test
        You should change the initial to your own representation.
        search.Problem.__init__(self, initial) creates the root node"""
        search.Problem.__init__(self, initial)
        
    def actions(self, state):
        """Returns all the actions that can be executed in the given
        state. The result should be a tuple (or other iterable) of actions
        as defined in the problem description file"""

    def result(self, state, action):
        """Return the state that results from executing the given
        action in the given state. The action must be one of
        self.actions(state)."""

    def goal_test(self, state):
        """ Given a state, checks if this is the goal state.
         Returns True if it is, False otherwise."""

    def h(self, node):
        """ This is the heuristic. It gets a node (not a state,
        state can be accessed via node.state)
        and returns a goal distance estimate"""
        return 0

    """Feel free to add your own functions
    (-2, -2, None) means there was a timeout"""

class drone:
    def __init__(self, number, location, capacity=0, packages=[]):
        self.number = number
        self.location = location

    def setLocation(self, new_loc):
        drone.location = new_loc

    def setCapacity(self, new):
        drone.capacity = new

    def delPackage(self, toDel):
        drone.packages.remove(toDel)

class client:
    def __init__(self, name, path, packages=[]):
        self.name=name
        self.path=path
        self.packages=packages
    def getLocation(self, time):
        path_length=len(self.path)
        return self.pathe[time%path_length] ;




class package:
    def __init__(self, number, location, isOnFloor=1, isOnDrone=0, ):



def create_drone_problem(game):
    return DroneProblem(game)

