Closed ctm closed 5 months ago
Ugh. If I do the above, I'll also need to remove from all the games, the fields which come directly from options. Otherwise, there'd be the possibility of conflict. That's not that big of a deal in and of itself, and it will bring me even closer to moving Options
into GameType
, but that's an attractive nuisance. It will require self-discipline to not go the whole nine yards…
FWIW, I was only going to do this because I thought I could quickly do some of the more tedious stuff with sed. Turns out, I can't make sed stop inserting after a search. The :a;n;ba
trick does not appear to work after an insert. I could, however, just be holding it wrong.
No problem, emacs keyboard macros to the rescue, right? Well, I made a typo and when ^G'ing out of my definition, emacs got out its output out of sync with its input, something that I believe is related to the rust analyzer, since I only started seeing that out of sync problem after adding a bunch of rust stuff to emacs. So, I closed emacs and am starting afresh, but this is becoming a time sink and may be something I either do another day or skip entirely and go directly to moving Options
into GameType
(and subsuming GameGroup
into GameType
).
Done. Deploying now. Took me longer than I'd like, but I'm happy with the results.
Refactor so that
GameInfo
andGameGroup
both implementDisplay
via havingOptions
implementDisplay.
This is a a refactor that is a step toward moving options from
Options
into theGameType
variants, which is what we'll want to do before creating the game builder and structure builder. By doing it now, we can make it so that we don't needStakes
to instantiate a new game just so we can display the game name in a way that doesn't actually show stakes. IOW, it allows me to clean up some of the structure template/sheets code.To do this we'll need to:
Display
forOptions
options
field to each of our fifteen game implementations (sed is myfriendenemy; emacs is my friend)sub_type
and replace with a method that gets the sub_type from theoptions
fieldoptions
and simply get them fromoptions
options
trait method toGameGroup
that returns a reference to the options field (all praise be to rmsed)blanketimplementation ofDisplay
fordyn GameGroup
use theoptions
trait and use the alternate displayGameInfo
'sfmt
callOptions
'sfmt