/**
 * You are a game developer and you have a map called playerData that stores the scores
 * of players in a game. The keys of the map are the player names and the values are the 
 * scores. You need to calculate the total score of all players and return it.
 *
 * @param playerData A map containing players' scores.
 * @return The total score of all players.
 *
 * Examples:
 * playerData = mapOf("Player1" to 100, "Player2" to 200, "Player3" to 150)
 * get_total_score(playerData) // 450
 *
 * playerData = mapOf("Player1" to 50, "Player2" to 75, "Player3" to 100)
 * get_total_score(playerData) // 225
 */
fun getTotalScore(playerData: Map<String, Int>): Int {

    var totalScore = 0

    // Accessing each value in the map using a loop and adding it to the totalScore
    for (score in playerData.values) {
        totalScore += score
    }

    return totalScore
}
/**
 * You are a game developer and you have a map called playerData that stores the scores
 * of players in a game. The keys of the map are the player names and the values are the 
 * scores. You need to calculate the total score of all players and return it.
 *
 * @param playerData A map containing players' scores.
 * @return The total score of all players.
 *
 * Examples:
 * playerData = mapOf("Player1" to 100, "Player2" to 200, "Player3" to 150)
 * get_total_score(playerData) // 450
 *
 * playerData = mapOf("Player1" to 50, "Player2" to 75, "Player3" to 100)
 * get_total_score(playerData) // 225
 */
fun getTotalScore(playerData: Map<String, Int>): Int {
/**
 * You are a game developer and you have a map called playerData that stores the scores
 * of players in a game. The keys of the map are the player names and the values are the 
 * scores. You need to calculate the total score of all players and return it.
 *
 * @param playerData A map containing players' scores.
 * @return The total score of all players.
 *
 * Examples:
 * playerData = mapOf("Player1" to 100, "Player2" to 200, "Player3" to 150)
 * get_total_score(playerData) // 450
 *
 * playerData = mapOf("Player1" to 50, "Player2" to 75, "Player3" to 100)
 * get_total_score(playerData) // 225
 */
fun getTotalScore(playerData: Map<String, Int>): Int {

    var totalScore = 0

    // Accessing each value in the map using a loop and adding it to the totalScore
    for (score in playerData.values) {
        totalScore += score
    }

    return totalScore
}