Esempio n. 1
0
        public void ShouldCountPlanOverlapFromBigInput()
        {
            var plans  = PuzzleInputParser.ParseStrings("Day3/Input.txt");
            var fabric = new PrototypeFabric(1000, plans);

            fabric.CountAreaOfOverlaps().Should().Be(116491);
        }
Esempio n. 2
0
        public void ShouldFindFirstNonOverlappingPlanFromBigInput()
        {
            var plans  = PuzzleInputParser.ParseStrings("Day3/Input.txt");
            var fabric = new PrototypeFabric(1000, plans);

            fabric.GetFirstNonOverlappingPlanId().Should().Be("707");
        }
Esempio n. 3
0
        public void ShouldCountPlanOverlapFromSimpleExample()
        {
            var plans = new List <string>
            {
                "#1 @ 1,3: 4x4",
                "#2 @ 3,1: 4x4",
                "#3 @ 5,5: 2x2"
            };
            var fabric = new PrototypeFabric(12, plans);

            fabric.CountAreaOfOverlaps().Should().Be(4);
        }