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

https://youtu.be/_1RKdmyH7gY


Advent of code in Rust - solving year 2020 exercise 22 part 1 (Twitch Live 2021-11-15)


In this episode, we started Advent of Code y2020 ex22 and we managed to complete part 1 (and reason a bit on how to implement part 2)!

This exercise wasn't particularly complicated and we basically 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 will be much more complicated as we will need to make the game recursive!

In this episode, thanks to a few comments in the chat (thanks @tallevo!) we learned tha in rust it is possible to capture values from loops, which helped to make our code nicer.

We also took the time to implement the parsing of the decks using the FromStr trait (https://doc.rust-lang.org/std/str/tra...).

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
SHOW LESS