FsUno.Prod icon indicating copy to clipboard operation
FsUno.Prod copied to clipboard

Push Event schemas out to Deck

Open bartelink opened this issue 11 years ago • 0 comments

As discussed (on twitter!), pushed Event records out to Deck (#7)

  • inlined PlayerPlayedWrong as PlayerPlayedAtWrongTurnEvent and PlayerPlayedWrongCardEvent to 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 Domain out of the picture - rename the assembly to FsUno and rename FsUno to FsUno.Console (to make way for a FsUno.Web placeholder which someone will do as an exercise :)
  • Maybe call the file Domain.fs and put the Deck stuff 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 digit into Deck.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!)

bartelink avatar Aug 15 '14 12:08 bartelink