trees.py
def remove_point(self, point: Tuple[int, int]) -> None:
        """ Remove information about a player at point <point> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with at that point does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(log(n))
        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> tree.contains_point((150, 150))
        True
        >>> tree.remove_point((150, 150))
        >>> tree.contains_point((150, 150))
        False
        >>> 'b' in tree
        False
        >>> 'a' in tree
        True
        >>> tree.is_leaf()
        True
        """
        x, y = self._centre
        x1, y1 = point
        if self._point == point:
            self._name, self._point = None, None
        elif 0 <= x1 <= 2 * x and 0 <= y1 <= 2 * y:
            if x1 <= x and y1 <= y and self._nw and \
                    self._nw.contains_point(point):
                self._nw.remove_point(point)
                if self._nw.is_empty():
                    self._nw = None
                self._check_one_child()
            elif x1 <= x and y < y1 and self._sw and \
                    self._sw.contains_point(point):
                self._sw.remove_point(point)
                if self._sw.is_empty():
                    self._sw = None
                self._check_one_child()
            elif x < x1 and y1 <= y and self._ne and \
                    self._ne.contains_point(point):
                self._ne.remove_point(point)
                if self._ne.is_empty():
                    self._ne = None
                self._check_one_child()
            else:
                if self._se and self._se.contains_point(point):
                    self._se.remove_point(point)
                    if self._se.is_empty():
                        self._se = None
                    self._check_one_child()
 Remove information about a player at point <point> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with at that point does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(log(n))
        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> tree.contains_point((150, 150))
        True
        >>> tree.remove_point((150, 150))
        >>> tree.contains_point((150, 150))
        False
        >>> 'b' in tree
        False
        >>> 'a' in tree
        True
        >>> tree.is_leaf()
        True
        
Remove information about a player at point  from this tree.
if self contains a tree with only one leaf subtree, the name
and point of this subtree is promoted to the parent node.
if a player with at that point does not exist in the tree, the method
fail silently without making any changes to the tree.


Remove information about a player at point from this tree . if self contains a tree with only one leaf subtree the name and point of this subtree is promoted to the parent node . if a player with at that point does not exist in the tree the method fail silently without making any changes to the tree .
def remove_point(self, point: Tuple[int, int]) -> None:
        x, y = self._centre
        x1, y1 = point
        if self._point == point:
            self._name, self._point = None, None
        elif 0 <= x1 <= 2 * x and 0 <= y1 <= 2 * y:
            if x1 <= x and y1 <= y and self._nw and \
                    self._nw.contains_point(point):
                self._nw.remove_point(point)
                if self._nw.is_empty():
                    self._nw = None
                self._check_one_child()
            elif x1 <= x and y < y1 and self._sw and \
                    self._sw.contains_point(point):
                self._sw.remove_point(point)
                if self._sw.is_empty():
                    self._sw = None
                self._check_one_child()
            elif x < x1 and y1 <= y and self._ne and \
                    self._ne.contains_point(point):
                self._ne.remove_point(point)
                if self._ne.is_empty():
                    self._ne = None
                self._check_one_child()
            else:
                if self._se and self._se.contains_point(point):
                    self._se.remove_point(point)
                    if self._se.is_empty():
                        self._se = None
                    self._check_one_child()
def remove_point ( self , point : Tuple [ int , int ] ) -> None : x , y = self . _centre x1 , y1 = point if self . _point == point : self . _name , self . _point = None , None elif 0 <= x1 <= 2 * x and 0 <= y1 <= 2 * y : if x1 <= x and y1 <= y and self . _nw and self . _nw . contains_point ( point ) : self . _nw . remove_point ( point ) if self . _nw . is_empty ( ) : self . _nw = None self . _check_one_child ( ) elif x1 <= x and y < y1 and self . _sw and self . _sw . contains_point ( point ) : self . _sw . remove_point ( point ) if self . _sw . is_empty ( ) : self . _sw = None self . _check_one_child ( ) elif x < x1 and y1 <= y and self . _ne and self . _ne . contains_point ( point ) : self . _ne . remove_point ( point ) if self . _ne . is_empty ( ) : self . _ne = None self . _check_one_child ( ) else : if self . _se and self . _se . contains_point ( point ) : self . _se . remove_point ( point ) if self . _se . is_empty ( ) : self . _se = None self . _check_one_child ( )
Remove information about a player at point <point> from this tree.
Remove information about a player at point <point > from this tree .
""" Remove information about a player at point <point> from this tree.
        if self contains a tree with only one leaf subtree, the name
        and point of this subtree is promoted to the parent node.
        if a player with at that point does not exist in the tree, the method
        fail silently without making any changes to the tree.

        Runtime: O(log(n))
        >>> tree = QuadTree((100, 100))
        >>> tree.insert('a', (90, 90))
        >>> tree.insert('b', (150, 150))
        >>> tree.contains_point((150, 150))
        True
        >>> tree.remove_point((150, 150))
        >>> tree.contains_point((150, 150))
        False
        >>> 'b' in tree
        False
        >>> 'a' in tree
        True
        >>> tree.is_leaf()
        True
        """
self
point
Tuple[int, int]