Adding the variable parts
In order for the BlackJackGameView and BlackJackPlayerView to work effectively together, we need to add variable parts for the player's hand, the player's name, and the card deck. Add three Variable parts from the Models category, dropping them on the free-form surface.
Change the name of the first variable part to Name. Change its type to String. Select Promote Part Feature from its pop-up menu. In the Promote features window, select the self attribute, then select Promote and OK. Connect the Name variable's self attribute to the window part's title attribute. The title of the window part will be different for each player.
Change the name of the second variable part to Player Hand. Change its type to CardDeck. Select Promote Part Feature from its pop-up menu. In the Promote features window, select the self attribute, then select Promote and OK. Connect the container's items attribute to the Player Hand variable's deck attribute. Now the container will display all cards that have been dealt to the player.
Change the name of the third variable part to Card Deck. Change its type to CardDeck. Select Promote Part Feature from its pop-up menu. In the Promote features window, select the self attribute, then select Promote and OK. Now you will be able to access the card deck from within the BlackJackPlayerView part.
Last modified date: 01/29/2015