Last active
June 30, 2020 00:45
-
-
Save andremw/01a85cc54b8eaeb680e3cad77954f522 to your computer and use it in GitHub Desktop.
DutchBlitz with F# and DDD - workflow steps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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