BurntSushi / advent-of-code

Rust solutions to AoC 2018

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aoc10: 80x80 canvas?

dnwe opened this issue · comments

I was wondering how you determined from the instructions that the points would all fit within an 80x80 canvas when the message was being displayed?

for _ in 0..1_000_000 {
points.step();
let (w, h) = points.dimensions();
if w <= 80 && h <= 80 {
writeln!(io::stdout(), "seconds: {}", points.seconds)?;
writeln!(io::stdout(), "{}", points.grid_string().trim())?;
writeln!(io::stdout(), "{}", "~".repeat(79))?;
}
}

thanks!