Example #1
0
        public void Test1()
        {
            HungerGame game   = new HungerGame(new string[] { "Bowser", "Mario" }, new string[] { "Mario killed Bowser" });
            string     answer = game.Solve();

            Assert.AreEqual("Name: Bowser" + System.Environment.NewLine +
                            "Killed: None" + System.Environment.NewLine +
                            "Killer: Mario" + System.Environment.NewLine +
                            "" + System.Environment.NewLine +
                            "Name: Mario" + System.Environment.NewLine +
                            "Killed: Bowser" + System.Environment.NewLine +
                            "Killer: Winner", answer);
        }
Example #2
0
        static void Main(string[] args)
        {
            string[] tributes = new string[int.Parse(Console.ReadLine())];
            for (int i = 0; i < tributes.Length; i++)
            {
                tributes[i] = Console.ReadLine();
            }
            string[] turns = new string[int.Parse(Console.ReadLine())];
            for (int i = 0; i < turns.Length; i++)
            {
                turns[i] = Console.ReadLine();
            }

            var game = new HungerGame(tributes, turns);

            Console.WriteLine(game.Solve());
        }