[aisleriot] klondike: Add "Unlimited redeals" option.



commit bd72075a59186ba599e47a86f2311e39073e957b
Author: Vincent Povirk <madewokherd gmail com>
Date:   Sat Oct 20 12:02:56 2012 -0500

    klondike: Add "Unlimited redeals" option.
    
    For bug 683195.

 games/klondike.scm  |    7 +++++--
 help/C/klondike.xml |    5 +++++
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/games/klondike.scm b/games/klondike.scm
index 5981115..d10cff7 100644
--- a/games/klondike.scm
+++ b/games/klondike.scm
@@ -16,9 +16,10 @@
 
 (use-modules (aisleriot interface) (aisleriot api))
 
-(define deal-one #t)    ;deal one card at a time from stock to waste
+(define deal-one #t)    ;deal one card at a time from stock to waste, 2 redeals
 (define deal-three #f)  ;deal three cards at a time from stock to waste
-(define no-redeal #f)   ;stock deals a card face-up to each pile in the tableau instead of to waste
+(define no-redeal #f)   ;deal one card at a time from stock to waste, no redeals
+(define unl-redeal #f)  ;deal one card at a time from stock to waste, unlimited redeals
 (define kings-only #t)  ;only allow kings to be moved to empty slots
 
 (define max-redeal 2)   ;number of redeals, -1 for unlimited
@@ -292,12 +293,14 @@
 	(list (_"Three card deals") deal-three)
 	(list (_"Single card deals") deal-one)
 	(list (_"No redeals") no-redeal)
+	(list (_"Unlimited redeals") unl-redeal)
 	'end-exclusive))
 
 (define (apply-options options)
   (set! deal-three (cadr (list-ref options 1)))
   (set! deal-one (cadr (list-ref options 2)))
   (set! no-redeal (cadr (list-ref options 3)))
+  (set! unl-redeal (cadr (list-ref options 4)))
   (set! max-redeal (cond (no-redeal 0)
 			 (deal-one 2)
 			 (#t -1))))
diff --git a/help/C/klondike.xml b/help/C/klondike.xml
index 78e5ffa..8fe101e 100644
--- a/help/C/klondike.xml
+++ b/help/C/klondike.xml
@@ -122,6 +122,11 @@
         <para>Cards are dealt one at a time from the stock. There is no redeal. Play this way if you want a challenge (and some frustration).</para>
       </listitem>
     </varlistentry>
+    <varlistentry><term>Unlimited redeals</term>
+      <listitem>
+        <para>Cards are dealt one at a time from the stock. There is no limit to how many times you can redeal the stock.</para>
+      </listitem>
+    </varlistentry>
   </variablelist>
   
   <para>Most likely you will consider one of the first two methods



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