/**
 * Given a list of furniture items and a list of new furniture items, replace the furniture items
 * at the specified room index with the new furniture items.
 *
 * @param furnitureList The list of furniture items.
 * @param roomIndex The index of the room to update.
 * @param newFurnitureList The list of new furniture items to replace.
 * @return The updated list of furniture items.
 */
fun updateRooms(furnitureList: MutableList<List<String>>, roomIndex: Int, newFurnitureList: List<String>): MutableList<List<String>> {

    // Create a copy of the furniture list
    val updatedFurnitureList = furnitureList.toMutableList()

    // Update the furniture items at the specified room index
    updatedFurnitureList[roomIndex] = newFurnitureList

    return updatedFurnitureList
}
/**
 * Given a list of furniture items and a list of new furniture items, replace the furniture items
 * at the specified room index with the new furniture items.
 *
 * @param furnitureList The list of furniture items.
 * @param roomIndex The index of the room to update.
 * @param newFurnitureList The list of new furniture items to replace.
 * @return The updated list of furniture items.
 */
fun updateRooms(furnitureList: MutableList<List<String>>, roomIndex: Int, newFurnitureList: List<String>): MutableList<List<String>> {
/**
 * Given a list of furniture items and a list of new furniture items, replace the furniture items
 * at the specified room index with the new furniture items.
 *
 * @param furnitureList The list of furniture items.
 * @param roomIndex The index of the room to update.
 * @param newFurnitureList The list of new furniture items to replace.
 * @return The updated list of furniture items.
 */
fun updateRooms(furnitureList: MutableList<List<String>>, roomIndex: Int, newFurnitureList: List<String>): MutableList<List<String>> {

    // Create a copy of the furniture list
    val updatedFurnitureList = furnitureList.toMutableList()

    // Update the furniture items at the specified room index
    updatedFurnitureList[roomIndex] = newFurnitureList

    return updatedFurnitureList
}