コード例 #1
0
        private void OutputSolve(Brainteaser parTask)
        {
            CreateSolveField();

            for (int j = 0; j < _RowCount + 2; j++)
            {
                for (int i = 0; i < _ColCount + 2; i++)
                {
                    if ((object)parTask.Field[i, j] != null)
                    {
                        dataGridViewField.Rows[j + _RowCount + 2].Cells[i].Value = parTask.Field[i, j].Image;
                    }
                }
            }
        }
コード例 #2
0
        private void buttonDepthSolve_Click(object sender, EventArgs e)
        {
            Pipe[,] testField = GetCopeField();

            Brainteaser br       = new Brainteaser(testField, _ColCount, _RowCount, _Enter, _Exit);
            bool        complete = br.DepthSolve();

            OutputSolve(br);

            if (complete)
            {
                MessageBox.Show("Решено");
            }
            else
            {
                MessageBox.Show("Не решено");
            }
        }
コード例 #3
0
        private void OutputSolve(Brainteaser parTask)
        {
            CreateSolveField();

            for (int j = 0; j < _RowCount + 2; j++)
            {

                for (int i = 0; i < _ColCount + 2; i++)
                {
                    if ((object)parTask.Field[i, j] != null)
                    {
                        dataGridViewField.Rows[j+_RowCount + 2].Cells[i].Value = parTask.Field[i, j].Image;
                    }
                }
            }
        }
コード例 #4
0
        private void buttonDepthSolve_Click(object sender, EventArgs e)
        {
            Pipe[,] testField = GetCopeField();

            Brainteaser br = new Brainteaser(testField, _ColCount, _RowCount, _Enter, _Exit);
            bool complete = br.DepthSolve();
            OutputSolve(br);

            if (complete)
            {
                MessageBox.Show("Решено");
            }
            else
            {
                MessageBox.Show("Не решено");
            }
        }