solitaire_09.py Diff

solitaire_09.py
--- /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/2.6.7/doc/tutorials/card_game/solitaire_08.py
+++ /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/2.6.7/doc/tutorials/card_game/solitaire_09.py
@@ -166,6 +166,20 @@
         for card in self.card_list:
             self.piles[BOTTOM_FACE_DOWN_PILE].append(card)
 
+        # - Pull from that pile into the middle piles, all face-down
+        # Loop for each pile
+        for pile_no in range(PLAY_PILE_1, PLAY_PILE_7 + 1):
+            # Deal proper number of cards for that pile
+            for j in range(pile_no - PLAY_PILE_1 + 1):
+                # Pop the card off the deck we are dealing from
+                card = self.piles[BOTTOM_FACE_DOWN_PILE].pop()
+                # Put in the proper pile
+                self.piles[pile_no].append(card)
+                # Move card to same position as pile we just put it in
+                card.position = self.pile_mat_list[pile_no].position
+                # Put on top in draw order
+                self.pull_to_top(card)
+
     def on_draw(self):
         """ Render the screen. """
         # Clear the screen