def remove_rule(self, rule): """ Returns True if rule was removed, False if it wasn't found """ return list_remove(self.rules, rule)
def remove_tile(self, tile): """ Returns True if tile was removed, False if it wasn't found """ if not tile.background: return any(list_remove(self.__tiles[p], tile) for p in self.sorted_priorities_list) else: return list_remove(self.get_background_tiles(), tile)