Exemplo n.º 1
0
        public Day15SolverTest()
        {
            var openTiles = new List <Day15Solver.Position>
            {
                (1, 1), (2, 1), (3, 1), (4, 1), (5, 1),
                (1, 2), (2, 2), (3, 2), (4, 2), (5, 2),
                (1, 3), (3, 3), (5, 3),
                (1, 4), (2, 4), (3, 4), (5, 4),
                (1, 5), (2, 5), (3, 5), (4, 5), (5, 5)
            };
            var units = new List <Day15Solver.Unit>
            {
                new Day15Solver.Unit((2, 1), Day15Solver.Unit.UnitType.Goblin),
                new Day15Solver.Unit((4, 2), Day15Solver.Unit.UnitType.Elf),
                new Day15Solver.Unit((5, 2), Day15Solver.Unit.UnitType.Goblin),
                new Day15Solver.Unit((5, 3), Day15Solver.Unit.UnitType.Goblin),
                new Day15Solver.Unit((3, 4), Day15Solver.Unit.UnitType.Goblin),
                new Day15Solver.Unit((5, 4), Day15Solver.Unit.UnitType.Elf)
            };

            map = new Day15Solver.Map(openTiles, units);

            sample1 = new Day15Solver.Map(new List <Day15Solver.Position>
            {
                (1, 1), (2, 1), (3, 1), (4, 1), (5, 1),
                (1, 2), (2, 2), (3, 2), (5, 2),
                (1, 3), (2, 3), (3, 3), (5, 3)
            },
Exemplo n.º 2
0
        public Day15MapFileReaderDataProviderTest()
        {
            var dataProvider = new Day15MapFileReaderDataProvider("data\\day15_map.txt");

            map = dataProvider.GetData();
        }