WIP day 2
This commit is contained in:
parent
d8f191fd9b
commit
8dc9b8fcbb
2500
input/02.txt
Normal file
2500
input/02.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,35 @@
|
||||
use crate::read;
|
||||
|
||||
struct Hand {
|
||||
pub letter: char,
|
||||
}
|
||||
|
||||
struct Round {
|
||||
enemy: Hand,
|
||||
me: Hand,
|
||||
}
|
||||
|
||||
pub fn run() {
|
||||
let input = read("02");
|
||||
let lines = input.lines();
|
||||
let lines = input.lines().map(|l| {
|
||||
let hands = l.split(' ').collect::<Vec<_>>();
|
||||
Round {
|
||||
enemy: Hand {
|
||||
letter: hands.first().unwrap().chars().next().unwrap(),
|
||||
},
|
||||
me: Hand {
|
||||
letter: hands[1].chars().next().unwrap(),
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
#[cfg(feature="part1")]
|
||||
#[cfg(feature = "part1")]
|
||||
{
|
||||
let a = "TODO";
|
||||
eprintln!("Day 2, Part 01: {}", a);
|
||||
}
|
||||
|
||||
#[cfg(feature="part2")]
|
||||
#[cfg(feature = "part2")]
|
||||
{
|
||||
let b = "TODO";
|
||||
eprintln!("Day 2, Part 02: {}", b);
|
||||
|
Loading…
Reference in New Issue
Block a user