Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="message"></param>
        private void HandleNewEventMessage(JObject message)
        {
            NewMessage?.Invoke(message);
            var eventParams = message["params"];

            if (eventParams == null)
            {
                return;
            }
            var type = (OrionOp)int.Parse(eventParams["command"].ToString());

            switch (type)
            {
            case OrionOp.GenerateFeatures:
                FeaturesGenerated?.Invoke(message);
                break;

            case OrionOp.Train:
                TrainingComplete?.Invoke(message);
                break;

            case OrionOp.MakePrediction:
                PredictionReady?.Invoke(message);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        public void TrainCharacterForALifetime(Character characterToTrain)
        {
            PersonalTrainer trainer = new PersonalTrainer(new ItemLinkFactory());

            trainer.OneMonthTrained += TrainerOnOneMonthTrained;

            trainer.TrainForALifetime(characterToTrain, new StandardDateTime(DateTime.Now)); //TODO: Change

            TrainingComplete?.Invoke(this, characterToTrain);
        }
Esempio n. 3
0
        public void TrainCharacterForFiveYear(Character characterToTrain)
        {
            PersonalTrainer trainer = new PersonalTrainer(new ItemLinkFactory());

            trainer.OneMonthTrained += TrainerOnOneMonthTrained;

            trainer.TrainForXNumberOfYears(characterToTrain, 5);

            TrainingComplete?.Invoke(this, characterToTrain);
        }
Esempio n. 4
0
        public void TrainCharacterForOneYear(Character characterToTrain)
        {
            var trainer = new PersonalTrainer(new ItemLinkFactory());

            trainer.OneMonthTrained += TrainerOnOneMonthTrained;

            trainer.TrainForAYear(characterToTrain);

            TrainingComplete?.Invoke(this, characterToTrain);
        }