Adding a Container Icon Tree part
Now that some of the basic functionality of the card deck is working, let's add a discard deck. As each Black Jack hand is complete the cards that were dealt for that hand will be placed in the discard deck. When the deck that is being dealt from is empty, the cards in the discard deck will be returned to the deck that is dealt from. This approach minimizes the creation and destruction of deck and card objects and improves performance.
We'll use a Container Icon Tree part for the discard deck. It will have a root item for each suit that exists in the discard deck. When the tree is expanded for a particular suit, the discarded cards of that suit will be shown.
The Container Icon Tree part has events that can be used to establish the structure of the tree. These events are used to:
•Determine whether an item has children
•Retrieve the item's children
Last modified date: 01/29/2015