def get_positions_dict(board_size):
    """Returns a dictionary with the positions of each tile in the puzzle."""
    number_of_tiles = board_size ** 2
    current_tile = 1
    positions = {}
    for y in range(board_size):
        for x in range(board_size):
            positions[current_tile] = (x, y)
            current_tile += 1
            if current_tile == number_of_tiles:
                current_tile = 0  # blank tile
    return positions