/**
 * This function takes a list of weapons and a list of players and returns a list of unique powerful weapons that only 
 * certain players can access.
 * 
 * @param weapons A list of weapons.
 * @param players A list of players.
 * @return A list of unique powerful weapons that only certain players can access.
 */
fun getUniquePowerfulWeapons(weapons: List<String>, players: List<Map<String, Any>>): List<String> {

    val powerfulWeapons = mutableListOf<String>()

    for (weapon in weapons) {
        var isPowerful = false
        for (player in players) {
            if (weapon in player["weapons"] as List<String> && player["level"] as Int >= 5) {
                isPowerful = true
                break
            }
        }
        if (isPowerful) {
            powerfulWeapons.add(weapon)
        }
    }

    return powerfulWeapons
}
/**
 * This function takes a list of weapons and a list of players and returns a list of unique powerful weapons that only 
 * certain players can access.
 * 
 * @param weapons A list of weapons.
 * @param players A list of players.
 * @return A list of unique powerful weapons that only certain players can access.
 */
fun getUniquePowerfulWeapons(weapons: List<String>, players: List<Map<String, Any>>): List<String> {
/**
 * This function takes a list of weapons and a list of players and returns a list of unique powerful weapons that only 
 * certain players can access.
 * 
 * @param weapons A list of weapons.
 * @param players A list of players.
 * @return A list of unique powerful weapons that only certain players can access.
 */
fun getUniquePowerfulWeapons(weapons: List<String>, players: List<Map<String, Any>>): List<String> {

    val powerfulWeapons = mutableListOf<String>()

    for (weapon in weapons) {
        var isPowerful = false
        for (player in players) {
            if (weapon in player["weapons"] as List<String> && player["level"] as Int >= 5) {
                isPowerful = true
                break
            }
        }
        if (isPowerful) {
            powerfulWeapons.add(weapon)
        }
    }

    return powerfulWeapons
}