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,10 +1,27 @@
|
||||
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")]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user