The Deck Pile

The next pile to consider is the deck pile. The constructor for the deck pile creates a list of cards, then randomly shuffles this collection. The select function simply removes the topmost card and places it on the discard pile stack.

[audio] [real] Text to accompany slide18, in Chapter 8 of An Introduction to Object-Oriented Programming