Simple Sudoku solver written in Rust.

Overview

Newdoku

Simple Sudoku solver written in Rust. Method is inspired by a method briefly outlined in a CS lecture I had that I decided to try and implement based only on my understanding from the lecture.

It is called Newdoku because I started doing this a while ago and forgot about it and decided to restart, hence "New"

Quick Start

$ cargo run
OPTIONS:
    -f, --file     Load Sudoku from file
    -h, --help           Print help information
    -q, --quiet          No output until finished solving (faster)
    -s, --step     Wait STEP millis between inserts [default: 0]

When loading from a file, the parser parses any digit as a number in the sudoku. Any other character other than a newline will be parsed as an empty square.

Example sudoku: xxxxxxx9xx9x7xx21xxx4x9xxxxx1xxx8xxx7xx42xxx5xx8xxxx748x1xxxx4xxxxxxxxxxxx9613xxx

Gives

+-------+-------+-------+
| . . . | . . . | . 9 . |
| . 9 . | 7 . . | 2 1 . |
| . . 4 | . 9 . | . . . |
+-------+-------+-------+
| . 1 . | . . 8 | . . . |
| 7 . . | 4 2 . | . . 5 |
| . . 8 | . . . | . 7 4 |
+-------+-------+-------+
| 8 . 1 | . . . | . 4 . |
| . . . | . . . | . . . |
| . . 9 | 6 1 3 | . . . |
+-------+-------+-------+

Contributing

PRs and issues welcome.

You might also like...
A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the
A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the "ruscii" library.

Thrust - a terminal shooter game Originally created as a project for the "Missing Semester" course at JKU Linz (338.006). The game is entirely written

A simple forum engine written in rust.

Hikari - Forum Engine based on Rust Still in progress Build the web server # Build the app cargo run --bin build-server # Run the app cargo run --bin

Rust-raytracer - 🔭 A simple ray tracer in Rust 🦀
Rust-raytracer - 🔭 A simple ray tracer in Rust 🦀

rust-raytracer An implementation of a very simple raytracer based on Ray Tracing in One Weekend by Peter Shirley in Rust. I used this project to learn

Simple retro game made using Rust bracket-lib by following "Herbert Wolverson's Hands on Rust" book.

Flappy Dragon Code from This program is a result of a tutorial i followed from Herbert Wolverson's Hands-on Rust Effective Learning through 2D Game De

A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

Endless Trial is a simple 2D bullet-hell-like game made in Rust with Tetra.

Endless Trial Endless Trial is a simple 2D bullet-hell-like game made in Rust with Tetra. To-do Sound Credits This project uses several free sprites:

Simple RUST game with the Bevy Engine

Simple RUST Game using the Bevy Engine YouTube videos for this code base: Episode 1 - Rust Game Development tutorial from Scratch with Bevy Engine Epi

minesweeper-rs is a simple minesweeper game using Rust and windows-rs.
minesweeper-rs is a simple minesweeper game using Rust and windows-rs.

minesweeper-rs minesweeper-rs is a simple minesweeper game using Rust and windows-rs. Key Features TBA Quick Start TBA How To Contribute Contributions

Comments
Releases(v0.6.1)
  • v0.6.1(Jul 21, 2022)

    What's Changed?

    • Fixed inaccurate documentation in README's quick start guide.

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.6.0...v0.6.1

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jul 21, 2022)

    What's Changed

    • Improved error handling by introducing Newdoku::InsertError and Newdoku::ParseError
    • Moved Sudoku::from_str to impl std::str::FromStr
    • Added clap as a default dependency so it can be disabled if only downloading the library

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.5.0...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jun 20, 2022)

  • v0.4.2(Jun 10, 2022)

  • v0.4.1(Jun 4, 2022)

    What's Changed

    • Improve documentation in readme
    • Remove demo.gif from crates.io package

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.4.0...v0.4.1

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Jun 2, 2022)

    What's Changed

    • Made Sudoku.is_full() public
    • Made Sudoku.try_insert() public

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.3.0...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(May 31, 2022)

    What's Changed

    • Improved documentation
    • Implemented PartialEq for Sudoku

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.2.0...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(May 31, 2022)

    What's Changed

    • Add the ability to solve a specific sudoku without needing to create a file to load by @morrigan-plus-plus in https://github.com/Piturnah/newdoku/pull/1

    New Contributors

    • @morrigan-plus-plus made their first contribution in https://github.com/Piturnah/newdoku/pull/1

    Full Changelog: https://github.com/Piturnah/newdoku/compare/v0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(May 30, 2022)

Owner
Peter Hebden
Student in the UK studying Computer Science and Mathematics.
Peter Hebden
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

Will 8 Jun 6, 2022
A fast 24 points game solver written in rust.

Solver024 This is a simple 24 points solver written in rust. Example 1 9 7 8 (1 * 7) + (8 + 9) 1 * (7 + (8 + 9)) ((1 * 7) + 8) + 9 ((1 - 7) + 9) * 8 (

DM Earth 6 Dec 27, 2022
Rust solver for color-sort puzzle game

Color-Sort Puzzle Solver Optimal solver for color-sort game (see example and game explanation sections below). This project (written in Rust) efficien

Amr Saber 4 May 30, 2023
Rust-implemented master mind game solver

master_mind_rust A Rust-implemented solver for the master mind game. You can play the master mind game online here → https://webgamesonline.com/master

Nariaki Tateiwa 4 Feb 25, 2024
An interactive, universal Wordle solver

Eldrow (Wordle in reverse) is an interactive, universal Wordle solver that attempts to achieve near to mathematically perfect performance without rely

agubelu 3 Sep 2, 2022
Claim probot daily credits, reChaptca solver

Probot, claim you daily credits it's a simple code that emulate to claim probot daily credits by using headless_chrome crate with rust language How to

Mr.Kasper 9 Dec 20, 2022
Rustcraft is a simple Minecraft engine written in rust using wgpu.

Rustcraft is a simple Minecraft engine written in rust using wgpu.

Raphael Van Hoffelen 110 Dec 22, 2022
🎮 A simple 2D game framework written in Rust

Tetra Tetra is a simple 2D game framework written in Rust. It uses SDL2 for event handling and OpenGL 3.2+ for rendering. Website Tutorial API Docs FA

Joe Clay 766 Jan 8, 2023
A simple Minecraft written in Rust with the Piston game engine

hematite A simple Minecraft written in Rust with the Piston game engine How To Open a World This method is only for personal use. Never distribute cop

PistonDevelopers 1.7k Dec 22, 2022
Simple island generator written in rust using bevy engine

Getting Started Easy enough to run cargo run --release Change generation speed Find the system set that looks like this .add_system_set(

Kris 3 Apr 21, 2022