Black Jack using Windows Workflow Part 1
In order to test my knowledge of Windows Workflow and to rise to Scott Woodgate’s challenge to me to build a game using WWF, I’m going to start a little project to make Black Jack. I’m going to document my design and development issues on my blog so that you can follow what’s happening.
I’ve decided to go with Black Jack since it’s a simple game with clear mechanics (this is my first attempt after all) and there’s not a lot of AI required (the dealer will draw cards until he’s at 15 or over).
So on with my design.
- I want to make this game available for web and for windows so the business logic is going to sit in the workflow.
- The game is player/event driven so I’m going to build it as a State Machine.
- My states and events

- Because the only host interaction that happens is in the player’s turn. I do not have to worry about tracking state.
- In the StateInitialization of the player’s and dealer’s turn I will call an external method passing the card that was dealt. In the StateFinalization of deciding the winner, I’ll again call an external method declaring the winner.
- To start with, I’m going to build the game as a console application so it’s easy to get debug information.
Now onto a bit of development, I should have a demo to post by the end of the weekend; gods, girlfriend (the more feared) and demons allowed.



[...] in the player’s turn or you might have bust then go to the deciding winner state (see my design in Part 1), the event was drawing a card which can have multiple outcomes. Tags:Black Jack demos s [...]