コード例 #1
0
ファイル: Program.cs プロジェクト: SirCAS/Advent-of-Code-2017
        static void Main(string[] args)
        {
            Console.WriteLine("+-------------------------+");
            Console.WriteLine("| Advent of Code - Day 09 |");
            Console.WriteLine("+-------------------------+");

            var input = File.ReadAllText("input.1.txt");

            var score = GarbageCollector.GetScore(input);

            Console.WriteLine($"Group score is {score}");

            var garbage = GarbageCollector.RemovedGarbage(input);

            Console.WriteLine($"Removed garbage is {garbage}");

            Console.WriteLine($" - Glædelig jul");
        }
コード例 #2
0
        public void RemovedGarbageTest(string input, int removed)
        {
            var result = GarbageCollector.RemovedGarbage(input);

            Assert.That(result, Is.EqualTo(removed));
        }