Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aoc10: 80x80 canvas? #7

Closed
dnwe opened this issue Dec 11, 2018 · 2 comments
Closed

aoc10: 80x80 canvas? #7

dnwe opened this issue Dec 11, 2018 · 2 comments

Comments

@dnwe
Copy link

dnwe commented Dec 11, 2018

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))?;
}
}

@BurntSushi
Copy link
Owner

See here: bbdce21#r31621663

@dnwe
Copy link
Author

dnwe commented Dec 13, 2018

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants