Exemplo n.º 1
0
        private void ListInstitutes()
        {
            string text = "";

            Dictionary <int, IInstitute> .ValueCollection institutes = instituteRepository.GetAll();
            foreach (IInstitute institute in institutes)
            {
                text += (institute.ID + ". " + institute.Name + " influence " + institute.Influence + "\n");
            }
            uiFactory.uidialog.ShowMonolog(text);
        }
Exemplo n.º 2
0
        public int Execute()
        {
            nobles                 = nobleRepository.GetAll();
            oldNobleRepository     = nobleRepository;
            institutes             = instituteRepository.GetAll();
            oldInstituteRepository = instituteRepository;

            foreach (INoble noble in nobles)
            {
                IInstitute institute = instituteRepository.Get(noble.InstituteId);
                while (institute.Influence < noble.Skill)
                {
                    int oldInfluence = institute.Influence;
                    institute.Influence += institute.Influence / 2;
                    noble.Skill         -= oldInfluence;
                    noble.WorksPublished++;
                }
            }
            return(0);
        }
Exemplo n.º 3
0
 public IEnumerable <Institute> GetAllInstitute()
 {
     return(instituteRepository.GetAll());
 }