def duplicate_check(x, y, counter, queue):
    """
    (int, int, int, list of tuple) -> bool

    Return true if and only if queue does not contain an item with the same
    x, y and a lower or equal counter
    """

    for item in queue:
        if item[0] == x and item[1] == y and item[2] <= counter:
            return False
    return True