/**
 * Detects if any two aircraft are at a collision risk.
 */
fun collisionDetection(aircraftList: List<Pair<Int, Int>>): Boolean {

    val aircraftCount = aircraftList.size
    for (i in 0 until aircraftCount) {
        var j = i + 1
        while (j < aircraftCount) {
            val dx = aircraftList[i].first - aircraftList[j].first
            val dy = aircraftList[i].second - aircraftList[j].second
            val distance = Math.sqrt((dx * dx + dy * dy).toDouble())
            if (distance < 100) {
                return true
            }
            j++
        }
    }
    return false
}
/**
 * Detects if any two aircraft are at a collision risk.
 */
fun collisionDetection(aircraftList: List<Pair<Int, Int>>): Boolean {
/**
 * Detects if any two aircraft are at a collision risk.
 */
fun collisionDetection(aircraftList: List<Pair<Int, Int>>): Boolean {

    val aircraftCount = aircraftList.size
    for (i in 0 until aircraftCount) {
        var j = i + 1
        while (j < aircraftCount) {
            val dx = aircraftList[i].first - aircraftList[j].first
            val dy = aircraftList[i].second - aircraftList[j].second
            val distance = Math.sqrt((dx * dx + dy * dy).toDouble())
            if (distance < 100) {
                return true
            }
            j++
        }
    }
    return false
}