Files
sudoku_solver/src/main.rs
Jonas Zeunert f414a71c84 Ref: Move parse into Playfield
Ref: Move playfield in separate file
2024-02-18 19:52:13 +01:00

26 lines
552 B
Rust

use clap::Parser;
mod playfield;
use playfield::Playfield;
#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cli {
// The sudoku field given as a space separated string from left to right, top to bottom, 0 denotes value
// absense
field: String,
// Size of one size of the field. For standard 9x9 input 9 (default)
#[arg(short, long)]
field_size: usize,
}
fn main() {
let cli = Cli::parse();
let playfield = Playfield::new(&cli.field, cli.field_size);
println!("Input:\n{}", playfield)
}