Initial
This commit is contained in:
commit
284f099d3e
22 changed files with 1717 additions and 0 deletions
27
src/main.rs
Normal file
27
src/main.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
mod common;
|
||||
mod days;
|
||||
mod macros;
|
||||
use std::error::Error;
|
||||
|
||||
use common::file::read_data;
|
||||
use days::{DayProvider, ResultType};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let day_provider = DayProvider::create();
|
||||
|
||||
//let params = env::args().skip(1).collect::<Vec<_>>();
|
||||
|
||||
let day = day_provider.get_day(1)?;
|
||||
let lines = read_data(day.get_day_number(), "input.txt")?;
|
||||
|
||||
match day.part1(lines)? {
|
||||
ResultType::IntResult(value) => {
|
||||
println!("Day {:02} part {}: {}", day.get_day_number(), 1, value);
|
||||
}
|
||||
ResultType::StringResult(_) => todo!(),
|
||||
ResultType::LinesResult(_) => todo!(),
|
||||
ResultType::NoResult => todo!(),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue