Is your feature request related to a problem? Please describe.
Similar to #75. You can easily make bad turns accidentally and validation is difficult with a dictionary
Describe the solution you'd like
Change the returned dictionaries from do_turn to subclasses of a new Action class. Each would have a validate method to remove that check from playgame.py, and simplifies what you need to pass in (you don't need to add discard to a dictionary if you are using a DiscardAction
Describe alternatives you've considered
What currently exists. It was a bit of a hassle to ensure incoming dictionaries were valid, but now its neatly factored
Additional context
This is a ease-of-use question. Is implementing a bot easier if you have full control of what your turn means, or if you pass 2-3 arguments to a black box?
Is your feature request related to a problem? Please describe. Similar to #75. You can easily make bad turns accidentally and validation is difficult with a dictionary
Describe the solution you'd like Change the returned dictionaries from do_turn to subclasses of a new
Action
class. Each would have a validate method to remove that check fromplaygame.py
, and simplifies what you need to pass in (you don't need to adddiscard
to a dictionary if you are using aDiscardAction
Describe alternatives you've considered What currently exists. It was a bit of a hassle to ensure incoming dictionaries were valid, but now its neatly factored
Additional context This is a ease-of-use question. Is implementing a bot easier if you have full control of what your turn means, or if you pass 2-3 arguments to a black box?