
Delete the simetrical cell from the string Search for another pair of cells that can be emptyed Restore the value of the simetrical cell Restore the value of the cell from the backup array Search for a pair of cells to empty (the empty cells should be simetrical from the center of the grid) Private void VacateAnotherPairOfCells(ref string str) Return the obtained score and the puzzle as a stringĪnd last useful (I think) function, VacateAnotherPairOfCells(): //. Current = Cursors.Default įor (int row = 1 row = 42 & score = 49 & score = 56 & score = 112 & score 50) Determining the difficulty level selected (from menu objects)Įlse if (MediumToolStripMenuItem.Checked)Įlse if (DifficultToolStripMenuItem.Checked)Įlse if (ExtremelyDifficultToolStripMenuItem.Checked)Įlse if (EmptyPuzzleToolStripMenuItem.Checked) Creating an instance for the SudokuPuzzle class ToolStripStatusLabel1.Text = "Se generează un puzzle nou." MsgBoxResult response = (MsgBoxResult)(MessageBox.Show("Doriți salvarea jocului curent?", "Salvează jocul curent.", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)) Įlse if (response = MsgBoxResult.Cancel) If (GameStarted) // this cheking part seems to work (message is displayed and game gets saved if selected)

Public void NewToolStripMenuItem_Click(System.Object sender, System.EventArgs e)


The idea that I’m trying to implement is as follows:

My problem is that I can’t seem to figure the code for generating a new puzzle by the application. I’m trying to make a C# application using Visual Studio 2008, that solves Sudoku puzzles.
