private bool FillBoardWithData(StreamReader inData,Board inBoard) { int number; for(int i=0;i<9;++i) for(int j=0;j<9;++j) { number = ReadNextDigit(inData); if(number != Board.EMPTY_CELL_VALUE) inBoard.Set(i,j,number); } return true; }
void AddNumber(TextBox inTextBox,Board inBoard) { if(inTextBox.Text.Length == 1) { try { int tagNumber = Int32.Parse((string)(inTextBox.Tag)); inBoard.Set(tagNumber / 9, tagNumber % 9,Int32.Parse(inTextBox.Text)); } catch(Exception) { } } }