DavisHenckel / PS-Sudoku

A PowerShell recursive Sudoku Solver & Sudoku puzzle Generator
6 stars 1 forks source link
algorithms powershell recursion sudoku-generator sudoku-solver

PS-Sudoku

A recursive Sudoku solver written as a PowerShell module.

Current Version - 2.0.2

Install from the PowerShell Gallery!

Install-Module -Name PS-Sudoku

Play Sudoku

There is now an option to play Sudoku! Enter PlaySudoku after the module is installed.
The function can provide a hint, or solve the puzzle given its current state.

Instructions

# First, generate a sudoku board, specify difficulty of "Easy, Medium, Hard, Expert, Insane, or UniqueSolution"
$SudokuBoard = GenerateGrid -Difficulty "Medium"

# Print the board to see the starting state
PrintGrid -SudokuGrid $SudokuBoard

# Solve the sudoku board. Note that depending on the difficulty of the puzzle, it may take a while. (The unique solution took 3.5 hrs on a 10th gen intel i5 processor)
SolveSudoku -SudokuGrid $SudokuBoard #add the -WatchAlgorithm switch to see the algorithm in action

# After the solver is complete, print the finished Sudoku board!
PrintGrid -SudokuGrid $SudokuBoard

Code Coverage

CodeCoverageUT
CodeCoverageIT
CodeCoverageAT

Build Status - Main Branch

CI System Environment Job Name & Status
GitHub Actions Windows(v2019 - Current) Build Status
GitHub Actions Ubuntu(v18 - Current) Build Status
GitHub Actions MacOS(v10 - Current) Build Status

Build Status - Development Branch

CI System Environment Job Name & Status
GitHub Actions Windows(v2019 - Current) Build Status
GitHub Actions Ubuntu(v18 - Current) Build Status
GitHub Actions MacOS(v10 - Current) Build Status