Skip to content

This repository was created in the realm of a Bachelor Research Project (BFP).

Notifications You must be signed in to change notification settings

pavlvolk/SudokuImageGeneration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

205 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 SudokuImageGeneration

Create Images in Sudoku Grids by marking certain cells.


πŸ“– Overview

The Sudoku Sudoku-Image-Generator is a tool that allows you to "draw" inside and empty sudoku grid by marking cells. It returns a valid and unique sudoku if it is possible with the marked cells.


✨ Features

  • Generate Sudoku grids with embedded images
  • Choose between two different selection modes
  • Generate or solve sudokus
  • Export results

πŸ“‚ Project Structure

/SudokuImageGeneration
β”œβ”€β”€ Backend/
β”‚ β”œβ”€β”€ data/
β”‚ └── src/
β”‚ β”œβ”€β”€ main.rs
β”‚ β”œβ”€β”€ calculation.rs
β”‚ β”œβ”€β”€ constants.rs
β”‚ β”œβ”€β”€ difficulty.rs
β”‚ β”œβ”€β”€ sudoku.rs
β”‚ β”œβ”€β”€ sudoku_clauses.rs
β”‚ β”œβ”€β”€ .gitignore
β”‚ β”œβ”€β”€ Cargo.lock
β”‚ └── Cargo.toml
β”‚
β”œβ”€β”€ Frontend/
β”‚ β”œβ”€β”€ pics/
β”‚ β”œβ”€β”€ .gitignore
β”‚ β”œβ”€β”€ index.html
β”‚ β”œβ”€β”€ styles.css
β”‚ β”œβ”€β”€ sudoku.js
β”‚ └── ui.js
β”‚ β”œβ”€β”€ .gitignore
└── README.md


βš™οΈ Installation

  1. Install Rust and Cargo: https://www.rust-lang.org/tools/install
  2. Clone the repo and build the project:
git clone https://github.com/pavlvolk/SudokuImageGeneration.git
cd SudokuImageGeneration/Backend
cargo build

πŸš€ Usage

Start the Server first:

cargo run

You'll have to leave that terminal window open and use another one for the website. In the new terminal window:

cd SudokuImageGeneration/Frontend
xdg-open index.html

Now you can use the website to its full capability!


πŸ”§ Configuration

Options include:

  • Grid size (4x4, 6x6, 9x9)
  • Sudoku Generator or Sudoku Solver mode
  • Background Image (You can upload or remove a background image to aid with your drawing)
  • You can either only mark cells or also add specific numbers at certain places
  • The difficulty and number of marked cells for each sudoku will be displayed
  • If a unique sudoku was found you can download the partial sudoku or the solution

πŸ™ Acknowledgments

  • This project uses cadical for SAT solving. We gratefully acknowledge the developers of cadical-rs for providing this library.

  • It also uses the sudoku-generator by stunmuffin.

About

This repository was created in the realm of a Bachelor Research Project (BFP).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5