Feat: First structure

This commit is contained in:
Jonas Zeunert
2024-02-16 18:22:46 +01:00
commit 870a062b19
4 changed files with 267 additions and 0 deletions

34
src/main.rs Normal file
View File

@@ -0,0 +1,34 @@
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cli {
// The sudoku field given as a 1x81 string from left to right, top to bottom, 0 denotes value
// absense
field: String,
}
struct Playfield {
fields: [[Field; 9]; 9],
open_fields: Vec<u8>,
}
struct Field {
possible_values: [u8; 9],
value: Option<u8>,
}
fn main() {
let cli = Cli::parse();
let playfield = parse_field(&cli.field);
println!("Hello, world!");
}
fn parse_field(field: &String) -> Playfield {}
mod tests {
#[test]
fn test_parse_field() {}
}