Ejemplo n.º 1
0
 public static Board BoardFromBitmap(int rows, int columns, int height, int width, int h_off, int w_off, Bitmap bmp)
 {
     PadImage pi = new PadImage(bmp, rows, columns, height, width, h_off, w_off);
     Board b = new Board(rows, columns);
     for (int i = 0; i < rows; i++)
         for (int j = 0; j < columns; j++)
         {
             b.Orbs[i, j] = pi.GetOrb(i, j);
         }
     Console.WriteLine(b.ToString());
     return b;
 }
Ejemplo n.º 2
0
        public static Board BoardFromBitmap(int rows, int columns, int height, int width, int h_off, int w_off, Bitmap bmp)
        {
            PadImage pi = new PadImage(bmp, rows, columns, height, width, h_off, w_off);
            Board    b  = new Board(rows, columns);

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    b.Orbs[i, j] = pi.GetOrb(i, j);
                }
            }
            Console.WriteLine(b.ToString());
            return(b);
        }