FsUno.Prod
FsUno.Prod copied to clipboard
Push Event schemas out to Deck
As discussed (on twitter!), pushed Event records out to Deck (#7)
- inlined
PlayerPlayedWrongasPlayerPlayedAtWrongTurnEventandPlayerPlayedWrongCardEventto in anticipation of desire to use Event type name to uniquely identify/route events (see #2)
Debatable points (feel free to push back/remove)
- reformatted to single line record as want to cause tension if it doesnt fit on a line (in order to help a UL fit in a file until that causes a similarly good tension )
Now... GameStartedEvent is now in namespace FsUno.Domain.Deck. For me, this makes me think:
- take
Domainout of the picture - rename the assembly toFsUnoand renameFsUnotoFsUno.Console(to make way for aFsUno.Webplaceholder which someone will do as an exercise :) - Maybe call the file
Domain.fsand put theDeckstuff in a Deck module (in the same file)
And... If we're trying to build a legible UL / DSL, Digit's junk has to get out of this file (and I really don't like the agonizing over perf in a UL, or the ugliness of [<Struct>])!
- put
digitintoDeck.fs(maybe in some AutoOpen module?)
I wonder does @swlaschin have any nice ways to manage the last bit (gating creation of a value type (or pretty lightweight int)) and more general proposals (see, I got him to using records over v3.1 named tuples and using a DU for the GameId so far!)