Example #1
0
        public MultidotEdge()
        {
            verticalData       = new int[n][];
            verticalDataSolved = new bool[n][];
            for (int i = 0; i < n; i++)
            {
                verticalData[i]       = new int[m + 1];
                verticalDataSolved[i] = new bool[m + 1];
                for (int j = 0; j < m + 1; j++)
                {
                    verticalData[i][j]       = 0;
                    verticalDataSolved[i][j] = false;
                }
            }

            horisontalData       = new int[n + 1][];
            horisontalDataSolved = new bool[n + 1][];
            for (int i = 0; i < n + 1; i++)
            {
                horisontalData[i]       = new int[m];
                horisontalDataSolved[i] = new bool[m];
                for (int j = 0; j < m; j++)
                {
                    horisontalData[i][j]       = 0;
                    horisontalDataSolved[i][j] = false;
                }
            }

            view = new MultidotEdgeView();
        }
Example #2
0
        public MultidotEdge(string data) : base()
        {
            string[] lines = data.Split('\n');

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

                verticalData[i]       = new int[m + 1];
                verticalDataSolved[i] = new bool[m + 1];
                for (int j = 0; j < m + 1; j++)
                {
                    verticalData[i][j]       = 0;
                    verticalDataSolved[i][j] = Convert.ToBoolean(singleLine[j]);
                }
            }

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

                horisontalData[i]       = new int[m];
                horisontalDataSolved[i] = new bool[m];
                for (int j = 0; j < m; j++)
                {
                    horisontalData[i][j]       = 0;
                    horisontalDataSolved[i][j] = Convert.ToBoolean(singleLine[j]);
                }
            }

            view = new MultidotEdgeView();
        }