Live streamed another episode of Advent of Code in Rust:
Advent of code in Rust - solving year 2020 exercise 24 part 1 (Twitch Live 2021-12-13)
https://youtu.be/7BYqxK2qaCU
In this episode, we started (and completed!) Advent of Code y2020 day 24!
This exercise is another variation of Game of Life (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) with a twist! Today's twist is that cells are not square but hexagonal!
Nothing too fancy about our solution except that we used and abused the `FromStr` (https://doc.rust-lang.org/std/str/trait.FromStr.html) and the `Iterator` (https://doc.rust-lang.org/std/iter/trait.Iterator.html) traits to handle the business logic of parsing the input and simulating various iterations of the game.
Finally we also went for a sparse space using an HashSet of points, because the game can grow indefinitely without boundaries.
Our solutions for part 2 is not super fast, so if you have any suggestion, please let us know through a comment or a PR :)
If you have any suggestion, we'd love to hear it, so please leave a comment or a create a PR!
For all the source code check out the official GitHub repo: https://github.com/lmammino/rust-advent
For seeing the next episodes live check out our Twitch channel: https://twitch.tv/loige