public CellEventInfo(SudokuGridPosition ChangePosition, CellEventType ChangeType, params int[] ChangedValues) { GridPosition = ChangePosition; EventType = ChangeType; Values = new EventValues(ChangedValues); Column = ChangePosition.Column; Row = ChangePosition.Row; }
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); }
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; }
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; }