140d7b6cbb
DisabledPolicy: a policy that doesn't
2023-04-03 20:12:06 -07:00
5af762474c
OverrideDefaultMsg and support in VerbosePolicy
...
For when you need a partially-functional message but don't want to repeatedly write the same Enact func.
2023-04-03 19:57:09 -07:00
2c1fc73ef5
FuncPolicy: function pointer policy
...
For when you don't want to go to the trouble of writing a type, but do need actual functions.
2023-04-03 19:52:47 -07:00
a1f55c865d
Refactor VerbosePolicy.
...
This allows it to switch between other complete policies, with fallbacks to a default if parts aren't impelemented. Complementing it is the change to BasicPolicy, which throws ErrUnimplemented if fields are missing, which VerbosePolicy uses as a "go ask the default" sign.
2023-04-03 19:41:32 -07:00
4e983bd0f0
Fix nil deref and identity failure.
...
Also updates deps to pick up a message display fix.
2023-04-03 01:59:23 -07:00
c798ba31e1
Fix nil dereference.
2023-04-03 01:40:47 -07:00
5728dd95f0
Oops, forgot to shuffle the card back in.
2023-04-03 01:36:47 -07:00
fb5aaeccfc
Implement first issue.
...
This seems like the least complicated way to get the desired reusable behaviors.
2023-04-03 01:32:02 -07:00
0e1f5ff246
Reversible policies
2023-04-03 00:17:01 -07:00