[aisleriot] gaps: Only allow a 2 in the left-most slots.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] gaps: Only allow a 2 in the left-most slots.
- Date: Mon, 6 Aug 2012 20:56:39 +0000 (UTC)
commit c94abbaee9f868b32fa1a0b018705b2964cf630b
Author: Vincent Povirk <madewokherd gmail com>
Date: Mon Aug 6 15:55:30 2012 -0500
gaps: Only allow a 2 in the left-most slots.
See bug 679170.
games/gaps.scm | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/games/gaps.scm b/games/gaps.scm
index a88b7e0..3141b51 100644
--- a/games/gaps.scm
+++ b/games/gaps.scm
@@ -134,18 +134,16 @@
(define (droppable? start-slot card-list end-slot)
(and (empty-slot? end-slot)
(not (= start-slot end-slot))
- (or (and (= 0 (modulo end-slot 13))
- (= 2 (get-value(car card-list)))
- )
- (and (not (= end-slot 0))
- (not (empty-slot? (- end-slot 1)))
+ (if (= 0 (modulo end-slot 13))
+ (= 2 (get-value(car card-list)))
+ (and (not (empty-slot? (- end-slot 1)))
(= (get-value(car card-list))
(+ (get-value(get-top-card (- end-slot 1))) 1)
)
(= (get-suit(car card-list))
(get-suit(get-top-card (- end-slot 1)))
)
- )
+ )
)
)
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]