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();
        }
Example #2
0
 public void SetByRow(SudokuLevel theSudokuLevel, int rowNum, int offset, int newValue)
 {
     theSudokuLevel.SetByRow(rowNum, offset, newValue);
 }
Example #3
0
 public void SetByCol(SudokuLevel theSudokuLevel, int colNum, int offset, int newValue)
 {
     theSudokuLevel.SetByCol(colNum, offset, newValue);
 }
Example #4
0
 public void SetByCell(SudokuLevel theSudokuLevel, int cellNum, int newValue)
 {
     theSudokuLevel.SetByCell(cellNum, newValue);
 }
Example #5
0
 public void SetByBox(SudokuLevel theSudokuLevel, int boxNum, int offset, int newValue)
 {
     throw new NotImplementedException();
 }
        public int GetByRow(SudokuLevel theSudokuLevel, int rowNum, int offset)
        {
            Cell theCell = theSudokuLevel.GetByRow(rowNum, offset);

            return(theCell.GetCell());
        }
        public int GetByCol(SudokuLevel theSudokuLevel, int colNum, int offset)
        {
            Cell theCell = theSudokuLevel.GetByCol(colNum, offset);

            return(theCell.GetCell());
        }
        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);
 }