Published a YouTube video
Used Rust
Hosted a live stream on Twitch
+1
Streamed another adventure of Solving Advent of Code in Rust

https://youtu.be/7YkD9Y7jZvg

In this episode, we completed Advent of Code y2020 ex22!

In this exercise we needed to simulate a simple game of cards with 2 players and calculate a value based on the final deck of the winning player.

Part 2 got more complicated by introducing some new rules that made the game recursive!

Our solution, although correct, seems quite slow, to the point that we initially thought we had an infinite loop. So there's definitely room for optimisation (probably reducing a few clones and figuring out a smarter way to keep track of the history).

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