public void Go(SudokuLevel theSudokuLevel, SudokuDisplay theSudokuDisplay, SudokuGet theSudokuGet, SudokuSet theSudokuSet)
        {
            sudokuLevel = theSudokuLevel;
            display     = theSudokuDisplay;
            get         = theSudokuGet;
            set         = theSudokuSet;

            display.Start();

            //Initial State of Sudoku Level
            sudokuLevel.SetSize(6);
            display.Get(sudokuLevel.Output());

            //Testing GetByRow, GetByCol and GetByCell
            display.Get(get.GetByCell(sudokuLevel, 1));
            display.Get(get.GetByRow(sudokuLevel, 0, 2));
            display.Get(get.GetByCol(sudokuLevel, 3, 0));

            //Testing SetByRow, SetByCol and SetByCell
            set.SetByCell(sudokuLevel, 1, 69);
            set.SetByRow(sudokuLevel, 0, 2, 420);
            set.SetByCol(sudokuLevel, 3, 0, 78);

            //Retesting GetByRow, GetByCol and GetByCell after changing values
            display.Get(sudokuLevel.Output());
            display.Get(get.GetByCell(sudokuLevel, 1));
            display.Get(get.GetByRow(sudokuLevel, 0, 2));
            display.Get(get.GetByCol(sudokuLevel, 3, 0));

            display.Stop();
        }
Пример #2
0
 public void SetByRow(SudokuLevel theSudokuLevel, int rowNum, int offset, int newValue)
 {
     theSudokuLevel.SetByRow(rowNum, offset, newValue);
 }
Пример #3
0
 public void SetByCol(SudokuLevel theSudokuLevel, int colNum, int offset, int newValue)
 {
     theSudokuLevel.SetByCol(colNum, offset, newValue);
 }
Пример #4
0
 public void SetByCell(SudokuLevel theSudokuLevel, int cellNum, int newValue)
 {
     theSudokuLevel.SetByCell(cellNum, newValue);
 }
Пример #5
0
 public void SetByBox(SudokuLevel theSudokuLevel, int boxNum, int offset, int newValue)
 {
     throw new NotImplementedException();
 }
Пример #6
0
        public int GetByRow(SudokuLevel theSudokuLevel, int rowNum, int offset)
        {
            Cell theCell = theSudokuLevel.GetByRow(rowNum, offset);

            return(theCell.GetCell());
        }
Пример #7
0
        public int GetByCol(SudokuLevel theSudokuLevel, int colNum, int offset)
        {
            Cell theCell = theSudokuLevel.GetByCol(colNum, offset);

            return(theCell.GetCell());
        }
Пример #8
0
        public int GetByCell(SudokuLevel theSudokuLevel, int cellNum)
        {
            Cell theCell = theSudokuLevel.GetByCell(cellNum);

            return(theCell.GetCell());
        }
 public void Reset(SudokuLevel theSudokuLevel, int size)
 {
     theSudokuLevel.SetSize(size);
 }