Beispiel #1
0
        public void CountAdjacentOccupiedSeats()
        {
            var lines = File.ReadAllLines(@"Days/Eleven/testcase.txt");

            var map = lines.Select(s => s.ToCharArray()).ToArray();

            var day = new DayElevenPartOne();

            var result = day.CountAdjacentOccupiedSeats(map, 0, 0, 10, 10);
        }
Beispiel #2
0
        public void CountAdjacentOccupiedSeats_Occupied()
        {
            var lines = new List <string>
            {
                "###",
                "###",
                "###",
            };

            var map = lines.Select(s => s.ToCharArray()).ToArray();

            var day = new DayElevenPartOne();

            day.CountAdjacentOccupiedSeats(map, 0, 0, 3, 3).Should().Be(3);
            day.CountAdjacentOccupiedSeats(map, 1, 1, 3, 3).Should().Be(8);
        }
Beispiel #3
0
        public void TestCase()
        {
            var lines = File.ReadAllLines(@"Days/Eleven/testcase.txt");

            var result = new DayElevenPartOne().CalculateNumberOfStablePopulatedSeats(lines);
        }
Beispiel #4
0
        public void CalculateAnswer()
        {
            var lines = File.ReadAllLines(@"Days/Eleven/input.txt");

            var result = new DayElevenPartOne().CalculateNumberOfStablePopulatedSeats(lines);
        }