Beispiel #1
0
        public void Star2()
        {
            _input       = FileHelpers.Read(_filePath);
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(2089, solution);
        }
Beispiel #2
0
        public void GetOccupiedSeats_Test3()
        {
            _input = new[]
            {
                ".............",
                ".L.L.#.#.#.#.",
                "............."
            };
            _parsedInput = _parser.Parse(_input);

            var solution = Day11Solver.GetOccupiedSeats(_parsedInput.Matrix, 1, 1);

            Console.WriteLine(solution);
            Assert.AreEqual(0, solution);
        }
Beispiel #3
0
        public void Star1_Test1()
        {
            _input = new[]
            {
                "L.LL.LL.LL",
                "LLLLLLL.LL",
                "L.L.L..L..",
                "LLLL.LL.LL",
                "L.LL.LL.LL",
                "L.LLLLL.LL",
                "..L.L.....",
                "LLLLLLLLLL",
                "L.LLLLLL.L",
                "L.LLLLL.LL"
            };
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star1(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(37, solution);
        }
Beispiel #4
0
 public void SetUp()
 {
     _solver = new Day11Solver();
     _input  = new Day11Input();
 }