Is your feature request related to a problem? Please describe.game_info dictionaries have a lot of fields, and we currently get no compile time checks or hints for the field names. This increases the odds of runtime errors and makes development (internal as well as of bots) less ergonomic.
Describe the solution you'd like
A class that has fields for each of the current dictionary keys might be a good solution.
I believe the current dictionary is only created by info_for_player in hanabi_table.py, but this shape of dictionary is used in many places, so the refactoring could be substantial.
Describe alternatives you've considered
I'm not sure what other abstractions (available in Python) that would serve this purpose, so I haven't considered anything else.
Additional context
I really like types and letting my tools help me (meaning compiler errors and hints from my editor). It's possible this suggestion isn't "Pythonic", but I do most of my programming in typed languages, so I figured I'd put it out there for consideration.
Is your feature request related to a problem? Please describe.
game_info
dictionaries have a lot of fields, and we currently get no compile time checks or hints for the field names. This increases the odds of runtime errors and makes development (internal as well as of bots) less ergonomic.Describe the solution you'd like A class that has fields for each of the current dictionary keys might be a good solution.
I believe the current dictionary is only created by
info_for_player
in hanabi_table.py, but this shape of dictionary is used in many places, so the refactoring could be substantial.Describe alternatives you've considered I'm not sure what other abstractions (available in Python) that would serve this purpose, so I haven't considered anything else.
Additional context I really like types and letting my tools help me (meaning compiler errors and hints from my editor). It's possible this suggestion isn't "Pythonic", but I do most of my programming in typed languages, so I figured I'd put it out there for consideration.