Exemple #1
0
        public static void DataInit()
        {
            PartyFactory factory = new PartyFactory();

            cParty = factory.MakeCParty();
            gParty = factory.MakeGParty();
            sParty = factory.MakeSParty();
            lParty = factory.MakeLParty();
            nParty = factory.MakeNParty();
            IParty[] ps = new IParty[] {
                cParty, gParty, sParty, lParty, nParty
            };
            // sort ps using p.Id as key
            // maybe this can help improve performance
            Array.Sort(ps, ps.Select(p => p.Id).ToArray());
            Parties = ps;

            Government.Start();
            Government.Instance.UpdateSeats(Election.CurrentElectionInfo);
        }