
# The Controller Database represents a collection of objects indexed by their position in the real plane

class ControllerDatabase:
    
    def __init__(self):
        self.data = dict()

    def add(self, data):
        self.data.update(data)

    def print_contents(self):
        print "Data collected:"
        print self.data




database = ControllerDatabase()

# Adds data to the database: data is a list of pairs (position, object) where each position is of the form (x,y)
def add_data_controller_database(data):
    database.add([((pos[0],pos[1]), obj) for [pos,obj] in data])

# Prints the recorded information
def print_contents_controller_database():
    database.print_contents()

