Class Applet has very structured sequence of operations:
-
init - to initialize applet
-
mouseDown and keyPressed to respond to user events
-
paint to repaint the screen
- Start and stop to begin and halt the applet (not used in this program).
Note also the use of the polymorphic variable allPiles,
which can hold any type of card pile.