コード例 #1
0
        public CellEventInfo(SudokuGridPosition ChangePosition, CellEventType ChangeType, params int[] ChangedValues)
        {
            GridPosition = ChangePosition;
            EventType    = ChangeType;
            Values       = new EventValues(ChangedValues);

            Column = ChangePosition.Column;
            Row    = ChangePosition.Row;
        }
コード例 #2
0
        public CellEventInfo(SudokuGridPosition ChangePosition, CellEventType ChangeType, params int[] ChangedValues)
        {
            GridPosition = ChangePosition;
            EventType = ChangeType;
            Values = new EventValues(ChangedValues);

            Column = ChangePosition.Column;
            Row = ChangePosition.Row;
        }
コード例 #3
0
        public override bool Equals(object obj)
        {
            SudokuGridPosition other = obj as SudokuGridPosition;

            if (other == null)
            {
                return(false);
            }

            if (this._column == other._column)
            {
                if (this._row == other._row)
                {
                    if (this._block == other._block)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
コード例 #4
0
ファイル: SudokuCell.cs プロジェクト: T5C2U7B/SudokuSolverAJR
        public SudokuCell(int Column, int Row, int Value)
        {
            this.Visible        = false;
            DefaultBackColor    = this.BackColor;
            DefaultErrorColor   = Color.MistyRose;
            this.DoubleBuffered = true;
            GridPosition        = new SudokuGridPosition(Column, Row);
            this.Value          = Value;

            IsClue = (Value != 0);

            if (IsClue)
            {
                // Empty. We dont need candidates because this cell already knows its value.
                Candidates = new SortedSet <int>();
            }
            else
            {                   // All possible numbers, 1 thru 9
                Candidates = new SortedSet <int>(Enumerable.Range(1, StaticSudoku.Dimension));
            }

            InitializeView();
            this.Visible = true;
        }
コード例 #5
0
ファイル: SudokuCell.cs プロジェクト: T5C2U7B/SudokuSolverAJR
        public SudokuCell(int Column, int Row, int Value)
        {
            this.Visible = false;
            DefaultBackColor = this.BackColor;
            DefaultErrorColor = Color.MistyRose;
            this.DoubleBuffered = true;
            GridPosition = new SudokuGridPosition(Column,Row);
            this.Value = Value;

            IsClue = (Value != 0);

            if(IsClue)
            {
                // Empty. We dont need candidates because this cell already knows its value.
                Candidates = new SortedSet<int>();
            }
            else
            {	// All possible numbers, 1 thru 9
                Candidates = new SortedSet<int>(Enumerable.Range(1, StaticSudoku.Dimension) );
            }

            InitializeView();
            this.Visible = true;
        }