Compare commits

..

1 commit

Author SHA1 Message Date
foosinn
e27c10d3b0 day11 2020-05-25 07:58:25 +02:00
4 changed files with 4 additions and 5 deletions

View file

@ -2,7 +2,8 @@ use std::collections::HashMap;
use std::env;
use std::fs::File;
use std::io;
mod computer;
use aoc2019::intcode;
#[derive(Hash, Default, PartialEq, Eq, Clone)]
struct Panel {
@ -116,7 +117,7 @@ impl Robot {
fn main() -> io::Result<()> {
let filename = env::args().nth(1).expect("provide file as first param");
let mut computer = computer::Computer::from(File::open(filename)?);
let mut computer = intcode::Computer::from(File::open(filename)?);
let mut canvas: HashMap<Panel, Color> = HashMap::new();
canvas.insert(Panel { x: 0, y: 0 }, Color::White);

1
src/lib.rs Normal file
View file

@ -0,0 +1 @@
pub mod intcode;

View file

@ -1,3 +0,0 @@
fn main() {
println!("Hello, world!");
}