Feat: First structure
This commit is contained in:
34
src/main.rs
Normal file
34
src/main.rs
Normal 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() {}
|
||||
}
|
||||
Reference in New Issue
Block a user