private void Initialize(MineField mineField) { if (mineField == null) { throw new ArgumentNullException("mineField"); } _mineField = mineField; _mineField.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_mineField_PropertyChanged); }
public Square(MineField owner, int row, int column, bool isMine) { if (owner == null) { throw new ArgumentNullException("owner"); } if (row < 0 || row >= owner.Rows) { throw new ArgumentOutOfRangeException("row"); } if (column < 0 || column >= owner.Columns) { throw new ArgumentOutOfRangeException("column"); } _owner = owner; _row = row; _column = column; _isMine = isMine; _state = SquareState.Unknown; _numberCache = -1; }
public Square(MineField owner, int row, int column, bool isMine) { if (owner == null) { throw new ArgumentNullException("owner"); } if (row < 0 || row >= owner.Rows) { throw new ArgumentOutOfRangeException("row"); } if (column < 0 || column >= owner.Columns) { throw new ArgumentOutOfRangeException("column"); } _owner = owner; _row = row; _column = column; _isMine = isMine; _state = SquareState.Unknown; _numberCache = -1; }
public MineFieldElement(MineField mineField) { Initialize(mineField); }
public MineFieldElement(MineField mineField) { Initialize(mineField); }
private void Initialize(MineField mineField) { if (mineField == null) { throw new ArgumentNullException("mineField"); } _mineField = mineField; _mineField.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_mineField_PropertyChanged); }