/**
 * The function handles the leaderboard for a game developer.
 *
 * @param score The current score of the player.
 * @param highScore The highest score achieved so far.
 * @param name The name of the player.
 * @return A formatted string displaying the leaderboard.
 */
fun handleLeaderboard(score: Int, highScore: Int, name: String): String {

    val newHighScore = score > highScore

    var leaderboard = "\n${"*".repeat(15)}\nLEADERBOARD\n${"*".repeat(15)}"
    leaderboard += "\n\nPlayer: $name\nScore: $score\n"

    if (newHighScore) {
        leaderboard += "\nCongratulations $name! You achieved a NEW HIGH SCORE!\n"
    }

    return leaderboard
}
/**
 * The function handles the leaderboard for a game developer.
 *
 * @param score The current score of the player.
 * @param highScore The highest score achieved so far.
 * @param name The name of the player.
 * @return A formatted string displaying the leaderboard.
 */
fun handleLeaderboard(score: Int, highScore: Int, name: String): String {
/**
 * The function handles the leaderboard for a game developer.
 *
 * @param score The current score of the player.
 * @param highScore The highest score achieved so far.
 * @param name The name of the player.
 * @return A formatted string displaying the leaderboard.
 */
fun handleLeaderboard(score: Int, highScore: Int, name: String): String {

    val newHighScore = score > highScore

    var leaderboard = "\n${"*".repeat(15)}\nLEADERBOARD\n${"*".repeat(15)}"
    leaderboard += "\n\nPlayer: $name\nScore: $score\n"

    if (newHighScore) {
        leaderboard += "\nCongratulations $name! You achieved a NEW HIGH SCORE!\n"
    }

    return leaderboard
}