protected async Task ShowResults()
        {
            if (ValidateTextbox())
            {
                invalid = false;
                DayTwo _challengeSolver = new DayTwo();

                _partOne = 0;
                _partTwo = 0;

                await RefreshReport();

                if (_passwords.Count > 0)
                {
                    _partOne = _challengeSolver.PartOne(_passwords);
                    _partTwo = _challengeSolver.PartTwo(_passwords);
                }

                if (_partOne != 0 && _partTwo != 0)
                {
                    childOne.Show();
                    childTwo.Show();
                }
                else
                {
                    invalid = true;
                }
            }
            else
            {
                invalid = true;
            }
        }
Beispiel #2
0
        public void PartTwo()
        {
            var dayTwo = new DayTwo();

            var output = new string(dayTwo.PartTwo(FilePath).ToArray());
        }
Beispiel #3
0
        public void DayTwoPartTwoReturnsCorrectly(string input, int expected)
        {
            var result = DayTwo.PartTwo(input);

            Assert.AreEqual(expected, result);
        }
Beispiel #4
0
        private static void DayTwoInput()
        {
            var file = File.ReadAllText("bin/Debug/netcoreapp2.0/Inputs/DayTwo.txt");

            Console.WriteLine(DayTwo.PartTwo(file));
        }