Icon

01_​BlackJack

BlackjackThis workflow implements the Blackjack card game via the Tile View (JavaScript) and CSS Editor nodes as well as the WebPortal functionality. It has an outer game loop that loops over multiple playsessions, and an inner game loop that iterates over the state (i.e., hands of cards, player decisions taken, etc.) of a single play session.Some Blackjack rules are not implemented yet, but could be added in the feature. These include betting with chips, insurances and the player options to double down, split, or surrender.Ready to play? Run this workflow in WebPortalCredits:Vectorized Playing Cards from http://code.google.com/p/vector-playing-cards/ Outer Game LoopEach iterations corresponds to one match of blackjack. A new match begins with the player being dealt two cards and the bank being dealt a single card. It ends with a game over screen, in which theplayer can decide to have a rematch or end the game. Inner Game LoopIterates over a single match of blackjack and reacts to human player input. The current game state ispresented to the player in the game panel. The player can then decide to hit another card or to stand andlet the bank draw to 17. At the end of each iteration, the game checks if a winner can be determined yet. Ifso, the match ends. to playerHit?Stand?to playerto playerto bank Deal One Card IF Switch Empty Table Creator End IF Recursive Loop End RecursiveLoop Start IF Switch End IF Deal One Card Deal One Card Deal One Card Generic Loop Start Variable ConditionLoop End Check Game State Bank hitsuntil at 17 Game Panel Game Over Screen BlackjackThis workflow implements the Blackjack card game via the Tile View (JavaScript) and CSS Editor nodes as well as the WebPortal functionality. It has an outer game loop that loops over multiple playsessions, and an inner game loop that iterates over the state (i.e., hands of cards, player decisions taken, etc.) of a single play session.Some Blackjack rules are not implemented yet, but could be added in the feature. These include betting with chips, insurances and the player options to double down, split, or surrender.Ready to play? Run this workflow in WebPortalCredits:Vectorized Playing Cards from http://code.google.com/p/vector-playing-cards/ Outer Game LoopEach iterations corresponds to one match of blackjack. A new match begins with the player being dealt two cards and the bank being dealt a single card. It ends with a game over screen, in which theplayer can decide to have a rematch or end the game. Inner Game LoopIterates over a single match of blackjack and reacts to human player input. The current game state ispresented to the player in the game panel. The player can then decide to hit another card or to stand andlet the bank draw to 17. At the end of each iteration, the game checks if a winner can be determined yet. Ifso, the match ends. to playerHit?Stand?to playerto playerto bank Deal One Card IF Switch Empty Table Creator End IF Recursive Loop End RecursiveLoop Start IF Switch End IF Deal One Card Deal One Card Deal One Card Generic Loop Start Variable ConditionLoop End Check Game State Bank hitsuntil at 17 Game Panel Game Over Screen

Nodes

Extensions

Links