Ejemplo n.º 1
0
        public override object SolvePartOne()
        {
            var rlist = new RoomList();

            var lines = FileLineParser.GetAllLines(@"Day04\Day04Input.txt");

            foreach (var line in lines)
            {
                rlist.AddRoom(line);
            }

            return(rlist.SumValidIds());
        }
Ejemplo n.º 2
0
        public override object SolvePartTwo()
        {
            var rlist = new RoomList();

            var lines = FileLineParser.GetAllLines(@"Day04\Day04Input.txt");

            foreach (var line in lines)
            {
                rlist.AddRoom(line);
            }

            var northpoleobjectstorage = rlist.SearchRoomByName("northpole");

            return($"{northpoleobjectstorage.ID} ({northpoleobjectstorage.DecipherName()})");
        }