/**
 * This function updates the given element of each room in the list with a new value.
 *
 * @param rooms A list of dictionaries representing different rooms.
 * @param element The element to be updated in each room.
 * @param newValue The new value to replace the element.
 * @return The modified list of rooms.
 */
fun updateRoomElements(rooms: List<MutableMap<String, Any>>, element: String, newValue: Any): List<MutableMap<String, Any>> {

    for (room in rooms) {
        if (element in room) {
            room[element] = newValue
        }
    }
    return rooms
}
/**
 * This function updates the given element of each room in the list with a new value.
 *
 * @param rooms A list of dictionaries representing different rooms.
 * @param element The element to be updated in each room.
 * @param newValue The new value to replace the element.
 * @return The modified list of rooms.
 */
fun updateRoomElements(rooms: List<MutableMap<String, Any>>, element: String, newValue: Any): List<MutableMap<String, Any>> {
/**
 * This function updates the given element of each room in the list with a new value.
 *
 * @param rooms A list of dictionaries representing different rooms.
 * @param element The element to be updated in each room.
 * @param newValue The new value to replace the element.
 * @return The modified list of rooms.
 */
fun updateRoomElements(rooms: List<MutableMap<String, Any>>, element: String, newValue: Any): List<MutableMap<String, Any>> {

    for (room in rooms) {
        if (element in room) {
            room[element] = newValue
        }
    }
    return rooms
}