From d636cbf5f9a0ae3296c1d419d1d66482e6565d05 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 7 Dec 2023 16:56:02 -0500 Subject: [PATCH] Start of implementation for 2023 day4 part 1 --- 2023/day4/src/main.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/2023/day4/src/main.rs b/2023/day4/src/main.rs index 47a249c..47ddaed 100644 --- a/2023/day4/src/main.rs +++ b/2023/day4/src/main.rs @@ -1,5 +1,31 @@ +use std::collections::HashMap; + const FILE_STR: &'static str = include_str!("input.txt"); +#[derive(Default)] +struct ScratchCard { + winning: Vec, + chosen: Vec, +} + +impl ScratchCard { + fn new(winning: Vec, chosen: Vec) -> Self { + ScratchCard { winning, chosen } + } +} + +type GameMap = HashMap; + +fn parse_game_table(table: &str) -> GameMap { + let mut map = HashMap::new(); + + table.split('\n').for_each(|line| { + todo!(); + }); + + map +} + fn part_one() { todo!(); }