コード例 #1
0
        public static MassMediaUnit GenerateRandom()
        {
            MassMediaUnit result = new MassMediaUnit(Utils.RandomFromList(StringManager.MassMediaTitles));

            result.Owner = Utils.RandomFromList(Core.getInstance().Businessmen);
            return(result);
        }
コード例 #2
0
 public Campaign(MassMediaUnit media, Member subject, double delta, uint duration)
 {
     Media     = media;
     Subject   = subject;
     Delta     = delta;
     TurnsLeft = duration;
 }
コード例 #3
0
ファイル: Core.cs プロジェクト: UQuark0/260-Weeks
        public void Init(uint numberOfBusinessmen, uint numberOfMassMedia)
        {
            initialized = true;

            Player = new President();

            // Order is important: Businessmen, mass media, social groups, president

            for (uint i = 0; i < numberOfBusinessmen; i++)
            {
                Members.Add(Businessman.GenerateRandom());
            }

            for (uint i = 0; i < numberOfMassMedia; i++)
            {
                Members.Add(MassMediaUnit.GenerateRandom());
            }

            Members.AddRange(SocialGroup.LoadSocialGroups());

            Members.Add(Player);

            foreach (Member member in Members)
            {
                member.CheckValid();
            }

            foreach (Member member in Members)
            {
                member.InitOpinions();
            }
        }
コード例 #4
0
 public Campaign(MassMediaUnit media, Member subject, CampaignMode mode, uint duration) : this(media, subject, (double)mode, duration)
 {
 }