Exemple #1
0
        public static void Main()
        {
            var listing   = System.IO.File.ReadAllLines("input.txt");
            var processor = new Processor(listing);

            processor.Execute();
            System.Console.WriteLine(processor.Acc);
            var bruteForceFinder = new BruteforceOperationFinder(listing);

            System.Console.WriteLine(bruteForceFinder.Find());
        }
Exemple #2
0
        public BruteforceOperationFinderTests()
        {
            var input = new List <string>()
            {
                "nop +0",
                "acc +1",
                "jmp +4",
                "acc +3",
                "jmp -3",
                "acc -99",
                "acc +1",
                "jmp -4",
                "acc +6"
            };

            _bfof = new BruteforceOperationFinder(input);
        }