Adjust the structure a bit and start on day 1

master
Joey Pollack 1 year ago
parent ea9fe9fe00
commit fc1a39adf5

@ -1,14 +1,39 @@
use solver_base::solver_base;
use ::solver_base::solver_base::Solver;
use utils::utils;
pub fn test_print()
pub struct Day1
{
}
impl Day1
{
pub fn new() -> Day1
{
Day1 { }
}
}
impl Solver for Day1
{
fn print_test()
{
println!("DAY 1 TEST PRINT");
solver_base::print_test();
// solver_base::print_test();
let dir = utils::get_working_dir();
let data = utils::load_data(&format!("{}/data/TESTING", dir));
println!("DATA: {}", data);
}
}
fn init(self: &mut Self)
{
todo!()
}
fn solve(self: &mut Self) -> String
{
todo!()
}
}

@ -1,15 +1,13 @@
pub trait Solver
{
fn init(args: Vec<String>);
fn solve();
}
// OLD TEST FUNCTION
pub fn print_test()
{
// TODO: Remove this function. Right now it just shows a "static" trait method.
fn print_test()
{
println!("SOLVER BASE PRINT TEST");
}
fn init(self: &mut Self);
fn solve(self: &mut Self) -> String;
}

@ -1,7 +1,8 @@
use std::env;
use day_1;
use day_1::day_1::Day1;
use solver_base::solver_base::Solver;
fn main()
{
@ -13,6 +14,10 @@ fn main()
}
println!("Hello, world!");
day_1::day_1::test_print();
let mut day_1 = Day1::new();
//day_1.print_test();
Day1::print_test();
day_1.init();
day_1.solve();
}

Loading…
Cancel
Save