/**
 * This function helps interior designers to complete the color selection process for each room in a house.
 *
 * @param roomDimensions List of tuples containing the dimensions of each room in the house.
 * @param colorsList List containing the available colors for the interior design.
 * @return A dictionary containing the selected color for each room.
 */
fun interiorDesignHelper(roomDimensions: List<Pair<Int, Int>>, colorsList: List<String>): Map<Pair<Int, Int>, String> {

    val roomColors = mutableMapOf<Pair<Int, Int>, String>()
    var index = 0  // Initialize the counter

    while (index < roomDimensions.size) {
        val room = roomDimensions[index]
        println("Select the color for room $room:")
        println("Available colors: $colorsList")
        val selectedColor = readLine()

        if (selectedColor in colorsList) {
            roomColors[room] = selectedColor!!
            index++  // Move to the next room
        } else {
            println("The color $selectedColor is not available. Please select another color.")
        }
    }

    return roomColors
}

// Example usage:

val dimensions = listOf(Pair(10, 12), Pair(8, 10), Pair(12, 15))
val availableColors = listOf("blue", "green")
/**
 * This function helps interior designers to complete the color selection process for each room in a house.
 *
 * @param roomDimensions List of tuples containing the dimensions of each room in the house.
 * @param colorsList List containing the available colors for the interior design.
 * @return A dictionary containing the selected color for each room.
 */
fun interiorDesignHelper(roomDimensions: List<Pair<Int, Int>>, colorsList: List<String>): Map<Pair<Int, Int>, String> {
/**
 * This function helps interior designers to complete the color selection process for each room in a house.
 *
 * @param roomDimensions List of tuples containing the dimensions of each room in the house.
 * @param colorsList List containing the available colors for the interior design.
 * @return A dictionary containing the selected color for each room.
 */
fun interiorDesignHelper(roomDimensions: List<Pair<Int, Int>>, colorsList: List<String>): Map<Pair<Int, Int>, String> {

    val roomColors = mutableMapOf<Pair<Int, Int>, String>()
    var index = 0  // Initialize the counter

    while (index < roomDimensions.size) {
        val room = roomDimensions[index]
        println("Select the color for room $room:")
        println("Available colors: $colorsList")
        val selectedColor = readLine()

        if (selectedColor in colorsList) {
            roomColors[room] = selectedColor!!
            index++  // Move to the next room
        } else {
            println("The color $selectedColor is not available. Please select another color.")
        }
    }

    return roomColors
}

// Example usage:

val dimensions = listOf(Pair(10, 12), Pair(8, 10), Pair(12, 15))
val availableColors = listOf("blue", "green")