/// <summary> /// Put a character through a year of events and training /// </summary> /// <param name="characterToTrain">Caracter to be trained</param> /// <returns></returns> public bool TrainForAYear(Character characterToTrain) { for (int i = 0; i < TrainingStatistics.DaysPerYear; i++) { int numberOfEventsForTheDay = RandomValueGenerator.GenerateRealWithinValues(TrainingStatistics.MinimumEventsPerDay, TrainingStatistics.MaximumEventsPerDay); for (int j = 0; j < numberOfEventsForTheDay; j++) { characterToTrain.InteractWithMe(RandomEventGenerator.GetRandomEvent()); } characterToTrain.GoToSleep(new LearningController()); if (i % 30 == 0) { OneMonthTrained?.Invoke(this, characterToTrain); } } return(true); }
private void TrainerOnOneMonthTrained(object sender, Character e) { OneMonthTrained?.Invoke(sender, e); }