Skip to content

Neonsy/CSharp-Sudoku-Generator-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Generator And Solver With Export Functionality

CSharp Console Dotnet Windows

Description

It started as an exercise in Java. Afterwards, I wanted to recreate it in C#, but more ideas kept coming up and this is the result. My teacher told me about the next topic being multi-dimensional arrays and that we would take a look at Sudoku. So, I was thinking about a generator, which was relatively easy except for the backtracking part of the algorithm because that was something new for me. After I wrote the program, I wanted to recreate it in C#, which led to this project.

Idea

After recreating it, I wanted to make an usable app out of it:

  1. Generate A Valid Sudoku
  2. Allow For Input For The Sudoku To Solve
  3. Check Whether The Input Is A Valid Board
  4. Solve The Sudoku
  5. Allow For Export To A TXT File

How To Use

  • You Start In A Menu Where You Can Press (G) To Generate A Sudoku Or (S) To Solve One.
  • When You Decide For (S)olving One You Can Enter Each Row With Or Without WhiteSpaces Depending On What You Prefer.
  • If You Enter An Empty Line It Will Reset To Row [1]
  • If You Have Anything Other Than Numbers In Your Input The Row Will Reset To [current] So You Don't Have To Start From The Beginning.

Note

I Do Not Check For Permissions So Make Sure The App Can Create The File If It Does Not Exist Or Open And Append To An Existing One.

Images

Menu

Start

Generate

Generate

Export

Export

Result

Export_Result

Input

Input

Example

Input_Example

Solved

Solved

Exit

End