Consider making quirks Options
tobiasvl opened this issue · comments
Currently, quirks are bools, so they can either be true or false; on or off. However, quirks can be said to be ternary, not binary, since for a large portion of the CHIP-8 corpus, we don't know whether a quirk is required to be on or required to be off. And for many games, many of the quirks don't affect the game either way (for those, a value of false makes sense since we want as little quirky behavior as possible, but still).
For these games, deserializing from a JSON string that doesn't mention a given quirk at all, setting a default (probably false) doesn't seem productive, since then octopt is making a judgment call that this quirk should be turned off, when the fact is that we don't know.
Therefore, quirks should probably be Options, and not serialize None values at all.
Ended up making everything Options.