Commit f59aff79 authored by Christian Persch's avatar Christian Persch

guile: Make sol.scm a module

parent ac28587e
NULL =
guiledir = $(pkgdatadir)/aisleriot
guile_DATA = \
api.scm \
$(NULL)
rulesdir = $(pkgdatadir)/games
rules_DATA = \
sol.scm \
\
accordion.scm \
agnes.scm \
athena.scm \
......@@ -101,6 +105,7 @@ rules_DATA = \
EXTRA_DIST = \
$(rules_DATA) \
$(guile_DATA) \
template.scm \
Rules.HOWTO \
$(NULL)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define row1 '(0 1 2 3 4 5 6 7 8 ))
(define row2 '(9 10 11 12 13 14 15 16 17 ))
(define row3 '(18 19 20 21 22 23 24 25 26 ))
......
......@@ -13,9 +13,9 @@
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
;
; Andersca claims that seed 1791329065 wins
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define BASE-VAL 0)
(define stock 0)
......
This diff is collapsed.
......@@ -16,6 +16,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
;; Athena differs from Klondike only in the intial layout
;; including 1 or 3 card deal, and any other options like ...
;; Optional "King Only" enabled by default [TODO]
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,10 +14,8 @@
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
;;
;; Goodsol gives odds as < 1%. It is possible to win in theory.
;; In practice I've only ever won when the deck wasn't shuffled
(use-modules (aisleriot interface) (aisleriot api))
(load "klondike.scm")
......
......@@ -15,6 +15,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define tableau '(0 1 6 7 12 13 16 17))
(define foundation '(2 3 4 5 8 9 10 11))
(define stock 14)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "freecell.scm")
(define (field-join? lower upper)
......
......@@ -14,7 +14,7 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define tableau '(4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21))
(define foundation '(0 1 2 3))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(make-standard-deck)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var add-stage #t)
(def-save-var fill-count 0)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define BASE-VAL 0)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (tableau? slot-id)
(< 5 slot-id))
(define foundation '(2 3 4 5))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var BASE-VAL 0)
(def-save-var base-set? #f)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(make-standard-deck)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define stock 0)
(define foundations '(1 2 3 4))
(define from-list '(5 6 7 8 9 10 11 12 13 14 15 16))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define BASE-VAL 0)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var free-reserves 0)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define foundation '(0 1 2 3 4 5))
(define found-amt 6)
(define tableau '(6 7 8 9))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define covering-vector '#(
(2 . (3 . 4))
(3 . (5 . 6))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define (new-game)
(initialize-playing-area)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -17,6 +17,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
;;; Commentary:
;; FREECELL
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define row1 '(0 1 2 3 4 5 6 7 8 9 10 11 12))
(define row2 '(13 14 15 16 17 18 19 20 21 22 23 24 25))
(define row3 '(26 27 28 29 30 31 32 33 34 35 36 37 38))
......
......@@ -17,6 +17,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
; Check if two cards match within the rules of the game.
;
; Note that we can use simple sums for normal matches and
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
;set up the deck
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var BASE-VAL 0)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "klondike.scm")
(define deal-one #f)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define extend-waste #t)
(define stock 0)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define foundation '(1 2 3 4 5 6 7 8))
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(make-standard-deck)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(make-standard-deck)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define BASE-VAL 0)
(define stock 0)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define stock 11)
(define waste 12)
(define reserves '(0 1 2 3 4 9 10 13 14 19 20 21 22 23 24 25))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define deal-one #t) ;deal one card at a time from stock to waste
(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
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var first-row #f)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define BASE-VAL 0)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define card '())
(define (add-line)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
;;;;
;; Settings:
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -15,6 +15,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
;set up the deck
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define deal-three #f)
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "osmosis.scm")
(define (initial-deal)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -17,6 +17,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
;; @(#) $Id: plait.scm,v 1.14 2005/07/10 07:08:54 callum Exp $
;; Constants
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define shuffle-mode #f)
(define ORDERED-LIST '())
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define BASE-VAL 0)
(define stock 0)
......
......@@ -23,6 +23,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "klondike.scm")
(define deal-one #t)
......
......@@ -13,6 +13,8 @@
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
; winning game seed: 2036201447
(define (new-game)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var free-reserves 0)
(define foundation '(0 1 6 7))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(define (new-game)
(initialize-playing-area)
(set-ace-low)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api) (ice-9 format))
(define suits-one #f)
(define suits-two #f)
(define suits-four #t)
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "spider.scm")
(define tableau '(13 14 15 16 17 18 19 20 21 22 23 24))
......
......@@ -14,6 +14,8 @@
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (aisleriot interface) (aisleriot api))
(load "spider.scm")