private bool IsHigher( CarsRemover firstConnction, CarsRemover secondConnection )
        {
            var fromStartPointDistance = Vector2.Distance( firstConnction.Edge.StartLocation, secondConnection.Location );
            var fromEndPointDistance = Vector2.Distance( firstConnction.Edge.EndLocation, secondConnection.Location );

            return fromStartPointDistance <= fromEndPointDistance;
        }
 public CarsRemoverCommand( IMouseInformation mouseInformation, Factories.Factories factories, IEventAggregator eventAggregator )
 {
     Contract.Requires( mouseInformation != null );
     Contract.Requires( factories != null );
     Contract.Requires( eventAggregator != null );
     this._mouseInformation = mouseInformation;
     this._mouseInformation.LeftButtonPressed.Subscribe( s =>
                         {
                             var carInserter = new CarsRemover( factories, s.Location );
                             eventAggregator.Publish( new AddControlToRoadLayer( carInserter ) );
                         } );
 }
 private bool AreConnected( CarsRemover firstConnction, CarsRemover secondConnection )
 {
     var firstConnector = firstConnction.Connector;
     return firstConnector.Top == secondConnection || firstConnector.Bottom == secondConnection;
 }