return;
    private void updateTrain(TrainModel tm, GameTime now, FreerailsPrincipal	    p, int trainIndex) {	int state = tm.getState();	switch (state) {	    case TrainModel.STATE_LOADING:		if (tm.getStateLastChangedTime().getTime() + LOADING_DELAY >			now.getTime())		    loadTrain(tm, now, p, trainIndex);		return;	    case TrainModel.STATE_UNLOADING:		if (tm.getStateLastChangedTime().getTime() + UNLOADING_DELAY >			now.getTime())		    unloadTrain(trainIndex, p, tm, now);		return;	    case TrainModel.STATE_RUNNABLE:		/* check to see whether the train has reached its destination		 */		if (tm.getTrainMotionModel().getPathToDestination().			getLength() == 0) {		    setState(trainIndex, p, TrainModel.STATE_UNLOADING, now,			    tm);		}	    default:		return;	}    }