def get_empty_tiles_positions(grid):  # Fonction renvoyant la liste des positions des tuiles vides
    """
    Gets all the empty tiles' coordinates.

    :param grid: The game grid
    :return: List with all the coordinates of empty tiles
    """
    list_empty_positions = []

    for i in range (len(grid)):
        for j in range (len(grid[0])):
            if grid[i][j] == ' ' or grid[i][j] == 0:
                list_empty_positions.append((i,j))

    return list_empty_positions