Beispiel #1
0
        public string SolveBoard2(string path, int rows, int cols, int width, int height, int w_off, int h_off)
        {
            path = Uri.UnescapeDataString(path);
            Console.WriteLine(path);
            Bitmap bmp = new Bitmap(path);
            Board  b   = PadImage.BoardFromBitmap(rows, cols, height, width, h_off, w_off, bmp);

            return(JsonConvert.SerializeObject(BeamDfs.GetBestPath(b, BoardScorer.Options.Horus)));
            //return JsonConvert.SerializeObject(BeamDfs.GetBestPath(b, Teams.LuBu));
        }
Beispiel #2
0
        public string SolveBoardOne(string path, int rows, int cols, int width, int height, int w_off, int h_off)
        {
            Board b = new Board(5, 6);

            b.Orbs = new Orb[, ]
            {
                { Orb.Green, Orb.Heal, Orb.Light, Orb.Green, Orb.Green, Orb.Red },
                { Orb.Dark, Orb.Blue, Orb.Red, Orb.Red, Orb.Blue, Orb.Light },
                { Orb.Heal, Orb.Red, Orb.Heal, Orb.Dark, Orb.Blue, Orb.Blue },
                { Orb.Green, Orb.Green, Orb.Dark, Orb.Light, Orb.Dark, Orb.Dark },
                { Orb.Dark, Orb.Green, Orb.Dark, Orb.Light, Orb.Red, Orb.Green }
            };
            return(JsonConvert.SerializeObject(BeamDfs.GetBestPath(b, BoardScorer.Options.Horus)));
        }