This repository was archived by the owner on Apr 5, 2025. It is now read-only.
Push Event schemas out to Deck #8
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed (on twitter!), pushed Event records out to Deck (#7)
PlayerPlayedWrong
asPlayerPlayedAtWrongTurnEvent
andPlayerPlayedWrongCardEvent
to in anticipation of desire to use Event type name to uniquely identify/route events (see Serialization / ES integration re type names #2)Debatable points (feel free to push back/remove)
Now...
GameStartedEvent
is now in namespaceFsUno.Domain.Deck
. For me, this makes me think:Domain
out of the picture - rename the assembly toFsUno
and renameFsUno
toFsUno.Console
(to make way for aFsUno.Web
placeholder which someone will do as an exercise :)Domain.fs
and put theDeck
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 [])!
digit
intoDeck.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!)