To be fair, Hall effect sensors still need calibration from time to time. However, once calibrated they shouldn't see any noticeable drift during a single gaming session.
Okay, if I really want to optimize this, I need to fix my deque copies (and maybe use a different data structure), and also do the checks @Ronan suggested. But it runs in reasonable time (at least in release), so I'm not going to fix it.
My solution is not fast, at least for a week 1 problem, but especially so since I think I should be able to solve it at compile time. But that would take some extra doing to set up. I really want to try to solve at least one problem at compile time.
Although the default layout probably needs to be updated, we have folders within the build folder for different compilers so when it comes time to do cross platform work we don't have to worry about multiple configurations stepping on each other.
@Ronan I'm using this year to learn the workflow of Conan2, CMake, and Visual Studio. I encountered some issues setting up my repo, but I think those are mostly resolved. We also haven't migrated to Conan2 yet at work, which is what I'll be spending a chunk of my December on.
But what I really get out of that is compile-time-regular-expressions, which not only allows me to generate the regex at compile time (something desperately needed by the standard library version), but also evaluating a regex at compile time.
I'm branching out this year and using the Conan package manager (which is what I use at work) so that I can also easily use the Python package advent-of-code-data. (Conan is written in Python, and package description files are also written in Python.)
I wonder how many AoC problems I'll be able to solve at compile time this year. That would mean adding in some framework stuff to generate a header with the input, but that's fairly easy to do with CMake. I already have Conan and advent-of-code-data automatically downloading my input files.
@Wipqozn A good take I heard (from an Ontario cousin I think) was that Doug just wants to be mayor of Toronto, and so is writing legislation that explicitly targets Toronto city hall.