[gnome-games] aisleriot: Implement slot types for Klondike based games



commit 5c43a2e4e9b437b5a691734f192e2a69282d7ae4
Author: Christian Persch <chpe gnome org>
Date:   Tue Jan 12 13:55:18 2010 +0100

    aisleriot: Implement slot types for Klondike based games
    
    Athena, Aunt Mary, Gold Mine, Saratoga.
    
    Not implemented yet for Ten Across, since it's unclear what slot type
    the 'temporary spots' should be.
    
    Bug #602513.

 aisleriot/rules/athena.scm    |   28 ++++++++++++++--------------
 aisleriot/rules/aunt_mary.scm |   27 ++++++++++++++-------------
 aisleriot/rules/gold_mine.scm |   28 ++++++++++++++--------------
 aisleriot/rules/saratoga.scm  |   28 ++++++++++++++--------------
 4 files changed, 56 insertions(+), 55 deletions(-)
---
diff --git a/aisleriot/rules/athena.scm b/aisleriot/rules/athena.scm
index 76bb02d..2c2b7e7 100644
--- a/aisleriot/rules/athena.scm
+++ b/aisleriot/rules/athena.scm
@@ -44,25 +44,25 @@
   (make-standard-deck)
   (shuffle-deck)
   
-  (add-normal-slot DECK)
+  (add-normal-slot DECK 'stock)
 
   (if deal-three
-      (add-partially-extended-slot '() right 3)
-      (add-normal-slot '()))
+      (add-partially-extended-slot '() right 3 'waste)
+      (add-normal-slot '() 'waste))
 
   (add-blank-slot)
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
   (add-carriage-return-slot)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
 
   (deal-cards stock tableau) 
   (deal-cards-face-up stock tableau) 
diff --git a/aisleriot/rules/aunt_mary.scm b/aisleriot/rules/aunt_mary.scm
index 1273472..b8cbfac 100644
--- a/aisleriot/rules/aunt_mary.scm
+++ b/aisleriot/rules/aunt_mary.scm
@@ -23,24 +23,25 @@
   (shuffle-deck)
 
   ;; Stock 
-  (add-normal-slot DECK)
+  (add-normal-slot DECK 'stock)
+  ;; Waste
   (if deal-three
-      (add-partially-extended-slot '() right 3)
-      (add-normal-slot '()))
+      (add-partially-extended-slot '() right 3 'waste)
+      (add-normal-slot '() 'waste))
 
   ;; Foundation (4)
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
   (add-carriage-return-slot)
   ;; Tableau (6)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
 
   ;; Pretty Good Solitaire (goodsol) deals Aunt Mary like this
   (deal-cards stock 
diff --git a/aisleriot/rules/gold_mine.scm b/aisleriot/rules/gold_mine.scm
index ce504db..9a084db 100644
--- a/aisleriot/rules/gold_mine.scm
+++ b/aisleriot/rules/gold_mine.scm
@@ -34,25 +34,25 @@
   (make-standard-deck)
   (shuffle-deck)
   
-  (add-normal-slot DECK)
+  (add-normal-slot DECK 'stock)
 
   (if deal-three
-      (add-partially-extended-slot '() right 3)
-      (add-normal-slot '()))
+      (add-partially-extended-slot '() right 3 'waste)
+      (add-normal-slot '() 'waste))
 
   (add-blank-slot)
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
   (add-carriage-return-slot)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
 
   (give-status-message)
 
diff --git a/aisleriot/rules/saratoga.scm b/aisleriot/rules/saratoga.scm
index adb32be..66aac13 100644
--- a/aisleriot/rules/saratoga.scm
+++ b/aisleriot/rules/saratoga.scm
@@ -47,25 +47,25 @@
   (make-standard-deck)
   (shuffle-deck)
   
-  (add-normal-slot DECK)
+  (add-normal-slot DECK 'stock)
 
   (if deal-three
-      (add-partially-extended-slot '() right 3)
-      (add-normal-slot '()))
+      (add-partially-extended-slot '() right 3 'waste)
+      (add-normal-slot '() 'waste))
 
   (add-blank-slot)
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
-  (add-normal-slot '())
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
+  (add-normal-slot '() 'foundation)
   (add-carriage-return-slot)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
-  (add-extended-slot '() down)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
+  (add-extended-slot '() down 'tableau)
 
   (deal-cards-face-up stock '(6 7 8 9 10 11 12 7 8 9 10 11 12 8 9 10 11 12 9 10 11 12 10 11 12 11 12 12))
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]