Commit 2020-08-29 11:21 84d47a0f
View on Github →refactor(set_theory/game): make impartial a class (#3974)
- Misc. style cleanups and code golf
- Changed naming and namespace to adhere more closely to the naming convention
- Changed impartialto be aclass. I am aware that @semorrison explicitly requested not to makeimpartiala class in the #3855, but after working with the definition a bit I concluded that making it a class is worth it, simply because writingimpartial_add (nim_impartial _) (nim_impartial _)gets annoying quite quickly, but also because you tend to get goal states of the formGrundy_value _ = Grundy_value _. By makingimpartiala class and making the game argument explicit, these goal states look likegrundy_value G = grundy_value H, which is much nicer to work with.