protected void createNewspaper()
        {
            base.createEntity(EntityTypeEnum.Newspaper);
            newspaper       = new Newspaper();
            newspaper.Owner = citizenCreator.Create().Entity;

            newspaper.Country   = countryCreator.Create();
            newspaper.CountryID = newspaper.Country.ID;
        }
示例#2
0
        private War makeDefault()
        {
            var war = new War()
            {
                ID            = IDGen.UniqueID,
                Attacker      = countryCreator.Create(),
                Defender      = countryCreator.Create(),
                Battles       = new List <Battle>(),
                StartDay      = 1,
                EndDay        = null,
                CountryInWars = new List <CountryInWar>()
            };

            war.AttackerCountryID = war.Attacker.ID;
            war.DefenderCountryID = war.Defender.ID;

            return(war);
        }
示例#3
0
        private MilitaryProtectionPact create()
        {
            var firstCountry  = countryCreator.Create();
            var secondCountry = countryCreator.Create();

            var mpp = new MilitaryProtectionPact()
            {
                FirstCountry    = firstCountry,
                FirstCountryID  = firstCountry.ID,
                StartDay        = GameHelper.CurrentDay,
                EndDay          = GameHelper.CurrentDay + 10,
                Active          = true,
                ID              = uniqueID,
                SecondCountry   = secondCountry,
                SecondCountryID = secondCountry.ID
            };

            firstCountry.MPPsFirstCountry.Add(mpp);
            secondCountry.MPPsSecondCountry.Add(mpp);

            return(mpp);
        }
        private Embargo makeDefault()
        {
            var embargo = new Embargo()
            {
                Active    = true,
                StartDay  = 0,
                StartTime = DateTime.Now,
                ID        = IDGen.UniqueID
            };

            var creatorCountry   = countryCreator.Create();
            var embargoedCountry = countryCreator.Create();

            embargo.CreatorCountry = creatorCountry;
            creatorCountry.CreatedEmbargoes.Add(embargo);
            embargo.CreatorCountryID = creatorCountry.ID;

            embargo.EmbargoedCountry = embargoedCountry;
            embargoedCountry.Embargoes.Add(embargo);
            embargo.EmbargoedCountryID = embargoedCountry.ID;

            return(embargo);
        }
 private void createCitizen()
 {
     base.createEntity(EntityTypeEnum.Citizen);
     citizen = new Citizen();
     SetCountry(countryCreator.Create());
 }