public void evaluateFailure()
    {
        boolean failFlag = false;
        
        this.brakeFailure = train.brakeFailure;
        this.engineFailure = train.engineFailure;
        this.signalPickupFailure = train.signalPickupFailure;
        
        if(train.brakeFailure)
        {
            this.brakeFailure = true;
            this.failureMessage = train.failure;
            failFlag = true;
        }
        else if(train.engineFailure)
        {
            this.engineFailure = true;
            this.failureMessage = train.failure;
            failFlag = true;
        }
        else if(train.signalPickupFailure)
        {
            this.engineFailure = true;
            this.failureMessage = train.failure;
            failFlag = true;
        }
        if(failFlag)
        {
            train.setFailureBrake(true);   
            //train.eBrake = true;
        }
        else
        {
            train.setFailureBrake(false);
            this.failureMessage="";
            //train.eBrake = false;
        }
    }