/**
 * Create a list of rewards with the given amount for each reward category.
 *
 * @param rewardDict A dictionary mapping reward categories to their points.
 * @param amount The amount of each reward category.
 * @return A list containing concatenated reward items.
 *
 * Example:
 * val rewardDict = mapOf("Gold" to 10, "Silver" to 5, "Bronze" to 2)
 * val amount = 3
 * createRewardList(rewardDict, amount) -> listOf("Gold", "Gold", "Gold", "Silver", "Silver",
 *                                                "Silver", "Bronze", "Bronze", "Bronze")
 */
fun createRewardList(rewardDict: Map<String, Int>, amount: Int): List<String> {

    val rewardList = mutableListOf<String>()

    // Loop through the dictionary items
    for ((reward, points) in rewardDict) {
        repeat(amount) {
            rewardList.add(reward)
        }
    }

    return rewardList
}
/**
 * Create a list of rewards with the given amount for each reward category.
 *
 * @param rewardDict A dictionary mapping reward categories to their points.
 * @param amount The amount of each reward category.
 * @return A list containing concatenated reward items.
 *
 * Example:
 * val rewardDict = mapOf("Gold" to 10, "Silver" to 5, "Bronze" to 2)
 * val amount = 3
 * createRewardList(rewardDict, amount) -> listOf("Gold", "Gold", "Gold", "Silver", "Silver",
 *                                                "Silver", "Bronze", "Bronze", "Bronze")
 */
fun createRewardList(rewardDict: Map<String, Int>, amount: Int): List<String> {
/**
 * Create a list of rewards with the given amount for each reward category.
 *
 * @param rewardDict A dictionary mapping reward categories to their points.
 * @param amount The amount of each reward category.
 * @return A list containing concatenated reward items.
 *
 * Example:
 * val rewardDict = mapOf("Gold" to 10, "Silver" to 5, "Bronze" to 2)
 * val amount = 3
 * createRewardList(rewardDict, amount) -> listOf("Gold", "Gold", "Gold", "Silver", "Silver",
 *                                                "Silver", "Bronze", "Bronze", "Bronze")
 */
fun createRewardList(rewardDict: Map<String, Int>, amount: Int): List<String> {

    val rewardList = mutableListOf<String>()

    // Loop through the dictionary items
    for ((reward, points) in rewardDict) {
        repeat(amount) {
            rewardList.add(reward)
        }
    }

    return rewardList
}