C# Class Sudoku_Solver.SudokuSolver

Show file Open project: dexxa/SudokuSolver Class Usage Examples

Protected Properties

Property Type Description
Blocks Panel[]
CellUnsolved int
FailedAttemp int
Guesses List
NumberSet System.Boolean
Numbers ].Number[
TestNumbers int[,,]

Public Methods

Method Description
GetNewBlock ( int row, int column ) : Panel
SetupBlocks ( ) : void
SetupCells ( Panel block, int row, int column ) : void
SudokuSolver ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AppendStatus ( string message ) : void
BackgroundWork ( object sender, EventArgs e ) : void
ClearCellStyle ( CellStyleState StyleState ) : void
ColumnContainsNumber ( int column, int number ) : System.Boolean
DisplayAllPossibleValues ( ) : void
DisplayCellPossibleValues ( int row, int column, List PossibleValues ) : void
FindCellInBlock ( int block, int number ) : Pointx
GetBestGuess ( int GuessNumberCount ) : List
GetBestGuesses ( ) : List
GetBlockHorizontalSiblings ( int block ) : List
GetBlockOriginByIndex ( int block ) : Pointx
GetBlockVerticalSiblings ( int block ) : List
GetCellCoordinateByName ( string name ) : Pointx
GetConflictingValueCoordinates ( int row, int column, int number ) : List
GetPossibleCellsBySiblings ( List CellSiblings, int TargetBlock ) : List
GetPossibleGuess ( ) : System.UInt64
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

IsGameSolved ( ) : bool
IsLegalValue ( int row, int column, int number ) : System.Boolean
IsLegalValue ( string name, int number ) : System.Boolean
RowContainsNumber ( int row, int number ) : System.Boolean
SetCellStyle ( int row, int column, CellStyleState StyleState ) : void
SetCellValue ( int row, int column, int value, CellState state ) : void
SetCellValue ( int row, int column, string value, CellState state ) : void
SetCellValue ( string name, int value, CellState state ) : void
SetNumbers_Click ( object sender, EventArgs e ) : void
SetOriginalNumber ( System.Boolean set ) : void
SetTestNumber ( ) : void
ShowPossibleValues_Click ( object sender, EventArgs e ) : void
SingleSolve_Click ( object sender, EventArgs e ) : void
SolveByRowColumnAndBlock ( int row, int column ) : List
SolveBySiblingsElimination ( int number, int row, int column ) : List
SolveMultiRun_Click ( object sender, EventArgs e ) : void
SolveMultiRuns ( ) : System.Boolean
SolveSingleRun ( ) : System.Boolean
StartGuess_Click ( object sender, EventArgs e ) : void
StartGuessing ( ) : void
SudokuSolver_Load ( object sender, EventArgs e ) : void
UpdateStatusProgress ( int GuessLeft, int GuessMade, System.UInt64 PossibleGuesses ) : void
UpdateStatusProgressMaximum ( int max ) : void
ValidateTextbox ( object sender, KeyEventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GetNewBlock() public method

public GetNewBlock ( int row, int column ) : Panel
row int
column int
return Panel

SetupBlocks() public method

public SetupBlocks ( ) : void
return void

SetupCells() public method

public SetupCells ( Panel block, int row, int column ) : void
block Panel
row int
column int
return void

SudokuSolver() public method

public SudokuSolver ( ) : System
return System

Property Details

Blocks protected property

protected Panel[] Blocks
return Panel[]

CellUnsolved protected property

protected int CellUnsolved
return int

FailedAttemp protected property

protected int FailedAttemp
return int

Guesses protected property

protected List Guesses
return List

NumberSet protected property

protected Boolean,System NumberSet
return System.Boolean

Numbers protected property

protected Number[,] Numbers
return ].Number[

TestNumbers protected property

protected int[,,] TestNumbers
return int[,,]