Beispiel #1
0
 /// <summary>
 /// cData Constructor:
 /// </summary>
 public cData()
 {
     _dataArray = new SudoData[g.PUZZLESIZE][][];
     for (int layer = 0; layer < g.PUZZLESIZE; layer++)
     {
         _dataArray[layer] = new SudoData[g.PUZZLESIZE][];
         for (int row = 0; row < g.PUZZLESIZE; row++)
         {
             _dataArray[layer][row] = new SudoData[g.PUZZLESIZE];
             for (int col = 0; col < g.PUZZLESIZE; col++)
             {
                 _dataArray[layer][row][col].Value  = 0;
                 _dataArray[layer][row][col].Hidden = true;
             }
         }
     }
 }
Beispiel #2
0
        private void parseLine(string sline)
        {
            int lid, rid = 0;

            int[] cols = null;
            try
            {
                lid = getNextInt(ref sline);
                rid = getNextInt(ref sline);
                readCols(sline, ref cols);
                for (int cid = 0; cid < g.PUZZLESIZE; cid++)
                {
                    _dataArray[lid][rid][cid] = new SudoData(cols[cid]);
                }
            }
            catch (Exception x)
            {
                throw new Exception($"cData.parseLine(): {x.Message}");
            }
        }