Ejemplo n.º 1
0
        public MultidotField(string imput) : base()
        {
            string[] lines = imput.Split('\n');

            data = new int[n][];
            for (int i = 0; i < n; i++)
            {
                string[] singleLine = lines[i].Split(' ');

                data[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    data[i][j] = Convert.ToInt32(singleLine[j]);
                }
            }

            used_count = new int[n][];
            for (int i = 0; i < n; i++)
            {
                string[] singleLine = lines[n + i].Split(' ');

                used_count[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    used_count[i][j] = Convert.ToInt32(singleLine[j]);
                }
            }
            view = new MultidotFieldView();
        }
Ejemplo n.º 2
0
 public MultidotField()
 {
     data       = new int[n][];
     used_count = new int [n][];
     for (int i = 0; i < n; i++)
     {
         data[i]       = new int[m];
         used_count[i] = new int[m];
         for (int j = 0; j < m; j++)
         {
             data[i][j]       = 5;
             used_count[i][j] = 0; //code of empty field
         }
     }
     view = new MultidotFieldView();
 }