Skip to content

Instantly share code, notes, and snippets.

@andremw
Last active June 30, 2020 00:45
Show Gist options
  • Save andremw/01a85cc54b8eaeb680e3cad77954f522 to your computer and use it in GitHub Desktop.
Save andremw/01a85cc54b8eaeb680e3cad77954f522 to your computer and use it in GitHub Desktop.
DutchBlitz with F# and DDD - workflow steps
"CheckGameAvailability" =
input: GameId
output: AvailableGameId OR GameAvailabilityError
dependencies: CheckGameExists, CheckGameIsFull
check if the game exists
check if the game hasn't started
check if there's room for one more player
if OK, then:
return AvailableGameId
else:
return GameAvailabilityError
"AddPersonToGame" =
input: AvailableGameId
output: PersonJoined OR JoinGameError
"SendAcknowledgmentToPerson" =
input: AvailableGameId
output: None (side effect)
"PlayerJoinedGame" =
input: AvailableGameId
output: PlayerJoinedGame event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment