def get_walls(grid, dimension):
    """ fills the walls array from a given grid
    """
    row_count = dimension
    column_count = dimension
    walls = []
    for i in range(row_count):
        for j in range(column_count):
            if grid[i][j] == 1:
                walls.append((i, j))
    return walls