title Ütközés kezelés participant RoadSection participant Vehicle 1 participant Vehicle 2 activate RoadSection RoadSection->RoadSection: getVehicles(): List opt vehicles.size() > 2 loop for each pair (Vehicle 1, Vehicle 2) RoadSection->Vehicle 1: canCollide(Vehicle 2) activate Vehicle 1 Vehicle 1-->RoadSection: true/false deactivate Vehicle 1 opt canCollide == true RoadSection->Vehicle 2: stun() activate Vehicle 2 Vehicle 2-->RoadSection: deactivate Vehicle 2 RoadSection->Vehicle 1: stun() activate Vehicle 1 Vehicle 1-->RoadSection: deactivate Vehicle 1 end end deactivate RoadSection end