Beispiel #1
0
        static void Main(string[] args)
        {
            Universe universe = new Universe("Southeros");

            PrintRullerAndAllies(universe);

            Console.WriteLine("Enter the kingdoms competing to be the ruler:");
            string input = Console.ReadLine().Trim();

            Console.WriteLine();
            string[] kingdomsNames = input.Split(' ');

            List <Kingdom> competingKingDoms = new List <Kingdom>();

            foreach (string name in kingdomsNames)
            {
                string nameUpperCase = name.ToUpper();
                if (universe.ContainsKingdom(nameUpperCase))
                {
                    competingKingDoms.Add(universe[nameUpperCase]);
                }
            }

            RandomizeMessage rndMessage   = new RandomizeMessage(new FileMessageSource("./boc-messages.txt"));
            BallotSystem     ballotSystem = new BallotSystem(competingKingDoms, universe.Kingdoms, rndMessage, 6);

            universe.SetRandomRuller(ballotSystem);
            PrintRoundsResult(ballotSystem.RoundResults);
            PrintRullerAndAllies(universe);
        }
Beispiel #2
0
 public RandomizeMessageTest()
 {
     rndMessage = new RandomizeMessage(new InMemoryMessageSource());
 }