import java.util.HashMap;
import java.util.Map;

public class GameConfig {

    public static void main(String[] args) {
        Map<String, Map<String, Object>> config = new HashMap<>();

        // [BulletTrackingSettings]
        Map<String, Object> bulletTrackingSettings = new HashMap<>();
        bulletTrackingSettings.put("TrackingMode", 2);
        config.put("BulletTrackingSettings", bulletTrackingSettings);

        // [Bullet]
        Map<String, Object> bullet = new HashMap<>();
        bullet.put("Bullet", 9999);
        bullet.put("BulletTracking", 9999);
        config.put("Bullet", bullet);

        // [Bulletsettings]
        Map<String, Object> bulletSettings = new HashMap<>();
        bulletSettings.put("Bullet", 99999);
        bulletSettings.put("BulletTracking", 9999);
        config.put("Bulletsettings", bulletSettings);

        // [Range]
        Map<String, Object> range = new HashMap<>();
        range.put("Range", 9999);
        config.put("Range", range);

        // [Rangesettings]
        Map<String, Object> rangeSettings = new HashMap<>();
        rangeSettings.put("Range", 9999);
        config.put("Rangesettings", rangeSettings);

        // [FlightPathAdjustments]
        Map<String, Object> flightPathAdjustments = new HashMap<>();
        flightPathAdjustments.put("StageA_TrackingStrength", 80);
        flightPathAdjustments.put("StageA_TurnSpeed", 60);
        flightPathAdjustments.put("StageA_DistanceThreshold", 15);
        config.put("FlightPathAdjustments", flightPathAdjustments);

        // [FlightPathB]
        Map<String, Object> flightPathB = new HashMap<>();
        flightPathB.put("StageB_Algorithm", 2);
        flightPathB.put("StageB_Prediction", 2.5);
        flightPathB.put("StageB_MaxAngle", 45);
        config.put("FlightPathB", flightPathB);

        // [FinalStageC]
        Map<String, Object> finalStageC = new HashMap<>();
        finalStageC.put("StageC_SuctionStrength", 95);
        finalStageC.put("StageC_IgnoreObstacleChance", 30);
        config.put("FinalStageC", finalStageC);

        // [TargetPriority]
        Map<String, Object> targetPriority = new HashMap<>();
        targetPriority.put("PriorityType", 1);
        targetPriority.put("Weight_Distance", 0.6);
        targetPriority.put("Weight_Health", 0.3);
        targetPriority.put("Weight_Threat", 0.1);
        config.put("TargetPriority", targetPriority);

        // [PerformanceLimits]
        Map<String, Object> performanceLimits = new HashMap<>();
        performanceLimits.put("MaxCalculationsPerFrame", 50);
        performanceLimits.put("DistanceDecay", 5);
        config.put("PerformanceLimits", performanceLimits);

        // [BulletPhysics]
        Map<String, Object> bulletPhysics = new HashMap<>();
        bulletPhysics.put("BaseSpeed", 30);
        bulletPhysics.put("AirResistance", 0.05);
        bulletPhysics.put("GravityEffect", -9.8);
        config.put("BulletPhysics", bulletPhysics);

        // [FlightStageA]
        Map<String, Object> flightStageA = new HashMap<>();
        flightStageA.put("ActiveTime", 0.5);
        flightStageA.put("TargetFilter", 1);
        flightStageA.put("CollisionLayer", "Wall,Obstacle");
        config.put("FlightStageA", flightStageA);

        // [StageBAdvanced]
        Map<String, Object> stageBAdvanced = new HashMap<>();
        stageBAdvanced.put("WaypointCount", 3);
        stageBAdvanced.put("WaypointAlgorithm", 1);
        stageBAdvanced.put("ObstacleAvoidanceChance", 70);
        config.put("StageBAdvanced", stageBAdvanced);

        // [FinalStageC]
        Map<String, Object> finalStageC2 = new HashMap<>();
        finalStageC2.put("SelfDestructDelay", 0.2);
        finalStageC2.put("ExplosionRadius", 2.5);
        finalStageC2.put("MissScatterAngle", 15);
        config.put("FinalStageC2", finalStageC2);

        // [MultiTargetHandling]
        Map<String, Object> multiTargetHandling = new HashMap<>();
        multiTargetHandling.put("RelockStrategy", 2);
        multiTargetHandling.put("OcclusionStayTime", 0.8);
        multiTargetHandling.put("FriendlyFireProtection", 1);
        config.put("MultiTargetHandling", multiTargetHandling);

        // [PerformanceTuning]
        Map<String, Object> performanceTuning = new HashMap<>();
        performanceTuning.put("MaxLifespan", 5);
        performanceTuning.put("FarDistanceUpdateInterval", 2);
        performanceTuning.put("BatchProcessThreshold", 20);
        config.put("PerformanceTuning", performanceTuning);

        // [VisualEffects]
        Map<String, Object> visualEffects = new HashMap<>();
        visualEffects.put("EffectType", 3);
        visualEffects.put("TrackingColor", "00FFFF");
        visualEffects.put("LockedColor", "FF0000");
        visualEffects.put("ImpactEffectDelay", 0.1);
        config.put("VisualEffects", visualEffects);

        // [NetworkLogic]
        Map<String, Object> networkLogic = new HashMap<>();
        networkLogic.put("SyncMethod", 2);
        networkLogic.put("PredictionTolerance", 0.3);
        networkLogic.put("AntiCheatCheckRate", 10);
        config.put("NetworkLogic", networkLogic);

        // 输出配置以验证
        System.out.println("Game Configuration:");
        for (Map.Entry<String, Map<String, Object>> entry : config.entrySet()) {
            System.out.println("\n[" + entry.getKey() + "]");
            for (Map.Entry<String, Object> subEntry : entry.getValue().entrySet()) {
                System.out.println(subEntry.getKey() + "=" + subEntry.getValue());
            }
        }
    }
}
