Fixed some day 6 copy/paste mistakes

master
Joey Pollack 1 year ago
parent 6e25fef987
commit d10cd7da69

@ -1,17 +1,17 @@
/****************************************************************************** /******************************************************************************
* @file day_5.rs * @file day_6.rs
* @author Joey Pollack * @author Joey Pollack
* @date 2024/12/05 (y/m/d) * @date 2024/12/05 (y/m/d)
* @modified 2024/12/05 (y/m/d) * @modified 2024/12/05 (y/m/d)
* @copyright Joseph R Pollack * @copyright Joseph R Pollack
* @brief Advent of Code 2024 day 5 problems * @brief Advent of Code 2024 day 6 problems
******************************************************************************/ ******************************************************************************/
use ::solver_base::solver_base::{Solver, DataSet, RunMode}; use ::solver_base::solver_base::{Solver, DataSet, RunMode};
use utils::utils; use utils::utils;
pub struct Day5 pub struct Day6
{ {
data_set: DataSet, data_set: DataSet,
run_mode: RunMode, run_mode: RunMode,
@ -22,11 +22,11 @@ pub struct Day5
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// DAY 4 IMPL // DAY 4 IMPL
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
impl Day5 impl Day6
{ {
pub fn new() -> Day5 pub fn new() -> Day6
{ {
Day5 { data_set: DataSet::Test, run_mode: RunMode::FirstCase, do_debug_prints: false, final_result: 0 } Day6 { data_set: DataSet::Test, run_mode: RunMode::FirstCase, do_debug_prints: false, final_result: 0 }
} }
fn solve_first_case(self: &mut Self) -> String fn solve_first_case(self: &mut Self) -> String
@ -46,11 +46,11 @@ impl Day5
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// SOLVER TRAIT IMPL // SOLVER TRAIT IMPL
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
impl Solver for Day5 impl Solver for Day6
{ {
fn print_test() fn print_test()
{ {
println!("DAY 4 TEST PRINT"); println!("DAY 6 TEST PRINT");
} }
fn init(self: &mut Self, data_set: DataSet, run_mode: RunMode, enable_debug_prints: bool) fn init(self: &mut Self, data_set: DataSet, run_mode: RunMode, enable_debug_prints: bool)
@ -63,14 +63,14 @@ impl Solver for Day5
let data_filename = let data_filename =
match self.data_set match self.data_set
{ {
DataSet::Test => format!("{}/data/day5_test_input", dir), DataSet::Test => format!("{}/data/day6_test_input", dir),
DataSet::TestAlt => panic!("Day 5: There is no TestAlt input file!"), //format!("{}/data/day2_test_input", dir), DataSet::TestAlt => panic!("Day 6: There is no TestAlt input file!"), //format!("{}/data/day2_test_input", dir),
DataSet::Full => format!("{}/data/day5_input", dir), DataSet::Full => format!("{}/data/day6_input", dir),
}; };
let _data = utils::load_data(&data_filename); let _data = utils::load_data(&data_filename);
// TODO: Day5::init // TODO: Day6::init
} }

Loading…
Cancel
Save