예제 #1
0
        static void Main(string[] args)
        {
            var debug = args.Length == 0;

            if (debug)
            {
                //args = new string[] { "puzzle", @"C:\Users\cashto\Documents\GitHub\icfp2019\work\puzzles\cashto.desc" };
                args = new string[] { @"C:\Users\cashto\Documents\GitHub\icfp2019\problems\prob-031.desc" };
            }

            if (args.Length == 2 && args[1] == "puzzle")
            {
                GenerateMap.GoMain(args[1]);
                return;
            }

            var fileName = args[0];

            var desc = File.ReadAllText(fileName);

            var state = new State(desc);

            if (args.Length == 2)
            {
                foreach (var c in args[1])
                {
                    state.Boosts.Add(c);
                }
            }

            Solve(state, debug);
        }
예제 #2
0
        public void TestGenerateMap()
        {
            var desc = GenerateMap.Generate(new MapSpecification()
            {
                Size = 50, MinVertexes = 0, MaxVertexes = 10000
            });
            var state = new State(desc);

            Console.WriteLine(state.Board);
        }