mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final1.git
synced 2024-11-24 01:15:05 +00:00
Actually remove crashed trains
This commit is contained in:
parent
302b755ee6
commit
fa62ba267f
@ -479,6 +479,7 @@ public class ModelRailwaySimulation {
|
||||
|| occupiedByOtherTrainPreviously.stream().anyMatch(occupiedByThisTrain::contains);
|
||||
if (anyIntersection) {
|
||||
train.removeFromRails();
|
||||
otherTrain.removeFromRails();
|
||||
// try to find/merge existing collisions
|
||||
Set<Train> existingCollision = null;
|
||||
for (Set<Train> collision : collisions) {
|
||||
|
Loading…
Reference in New Issue
Block a user