Today in “Idiomatic Kotlin”, we’re solving another Advent of Code challenge. We will be simulating, diagnosing, and fixing a small, made up game console! If you have ever wanted to implement your own virtual machine or emulator for an existing system like a game console or a retro computing device, you’ll find this issue particularly interesting!
As usual, a number of Kotlin features will help us achieve that goal, like sealed classes, sequences, and immutability.
Understanding the challenge
The story of Advent of Code 2020, Day 8 goes like this:
A passenger on our flight hands