Compare commits
1 commit
f43e65c790
...
e27c10d3b0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e27c10d3b0 |
4 changed files with 4 additions and 5 deletions
|
@ -2,7 +2,8 @@ use std::collections::HashMap;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io;
|
use std::io;
|
||||||
mod computer;
|
|
||||||
|
use aoc2019::intcode;
|
||||||
|
|
||||||
#[derive(Hash, Default, PartialEq, Eq, Clone)]
|
#[derive(Hash, Default, PartialEq, Eq, Clone)]
|
||||||
struct Panel {
|
struct Panel {
|
||||||
|
@ -116,7 +117,7 @@ impl Robot {
|
||||||
|
|
||||||
fn main() -> io::Result<()> {
|
fn main() -> io::Result<()> {
|
||||||
let filename = env::args().nth(1).expect("provide file as first param");
|
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();
|
let mut canvas: HashMap<Panel, Color> = HashMap::new();
|
||||||
canvas.insert(Panel { x: 0, y: 0 }, Color::White);
|
canvas.insert(Panel { x: 0, y: 0 }, Color::White);
|
||||||
|
|
1
src/lib.rs
Normal file
1
src/lib.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod intcode;
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println!("Hello, world!");
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue