/**
 * Given a dictionary of game scores, this function will check if the specified player's score is higher than all other
 * scores for the same game. If it is, the function will return true. Otherwise, it will return false.
 *
 * @param scores A dictionary containing game scores. The keys represent the games, and the values represent the scores for each game.
 * @param player The name of the player whose score needs to be checked.
 * @return true if the player's score is higher than all other scores for the same game, false otherwise.
 */
fun checkGameScores(scores: Map<String, Map<String, Int>>, player: String): Boolean {

    // Access the player's score for each game in the scores dictionary
    for ((game, score) in scores) {
        val playerScore = score[player]

        // Compare the player's score with all other scores for the same game
        for ((otherPlayer, otherScore) in score) {
            if (otherPlayer != player && playerScore!! <= otherScore) {
                // Return false if the player's score is not higher than all other scores for the same game
                return false
            }
        }
    }
    // Return true if the player's score is higher than all other scores for all games
    return true
}
/**
 * Given a dictionary of game scores, this function will check if the specified player's score is higher than all other
 * scores for the same game. If it is, the function will return true. Otherwise, it will return false.
 *
 * @param scores A dictionary containing game scores. The keys represent the games, and the values represent the scores for each game.
 * @param player The name of the player whose score needs to be checked.
 * @return true if the player's score is higher than all other scores for the same game, false otherwise.
 */
fun checkGameScores(scores: Map<String, Map<String, Int>>, player: String): Boolean {
/**
 * Given a dictionary of game scores, this function will check if the specified player's score is higher than all other
 * scores for the same game. If it is, the function will return true. Otherwise, it will return false.
 *
 * @param scores A dictionary containing game scores. The keys represent the games, and the values represent the scores for each game.
 * @param player The name of the player whose score needs to be checked.
 * @return true if the player's score is higher than all other scores for the same game, false otherwise.
 */
fun checkGameScores(scores: Map<String, Map<String, Int>>, player: String): Boolean {

    // Access the player's score for each game in the scores dictionary
    for ((game, score) in scores) {
        val playerScore = score[player]

        // Compare the player's score with all other scores for the same game
        for ((otherPlayer, otherScore) in score) {
            if (otherPlayer != player && playerScore!! <= otherScore) {
                // Return false if the player's score is not higher than all other scores for the same game
                return false
            }
        }
    }
    // Return true if the player's score is higher than all other scores for all games
    return true
}