gnome-games r9028 - trunk/aisleriot/rules
- From: vpovirk svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r9028 - trunk/aisleriot/rules
- Date: Thu, 9 Apr 2009 04:32:31 +0000 (UTC)
Author: vpovirk
Date: Thu Apr 9 04:32:31 2009
New Revision: 9028
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9028&view=rev
Log:
aisleriot: don't allow no-op drops in Straight Up
This fixes a test failure (see bug 569936).
Modified:
trunk/aisleriot/rules/straight_up.scm
Modified: trunk/aisleriot/rules/straight_up.scm
==============================================================================
--- trunk/aisleriot/rules/straight_up.scm (original)
+++ trunk/aisleriot/rules/straight_up.scm Thu Apr 9 04:32:31 2009
@@ -78,7 +78,8 @@
(> slot-id 5))))
(define (droppable? start-slot card-list end-slot)
- (cond ((and (> end-slot 1)
+ (cond ((= start-slot end-slot) #f)
+ ((and (> end-slot 1)
(< end-slot 6))
(and (eq? (get-suit (get-top-card end-slot))
(get-suit (car card-list)))
@@ -96,7 +97,8 @@
(else #f)))
(define (button-released start-slot card-list end-slot)
- (cond ((and (> end-slot 1)
+ (cond ((= start-slot end-slot) #f)
+ ((and (> end-slot 1)
(< end-slot 6))
(and (eq? (get-suit (get-top-card end-slot))
(get-suit (car card-list)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]