0

There are many card games in the aisleriot package. However, one is missing : crescent solitaire. You can play it online, for free, but it has annoying features such as a timeout. And advertisement if you are not using an add blocker.

So I would like to add crescent solitaire to aisleriot.

It says on the aisleriot web site : "The rules for the games have been coded for your pleasure in the GNOME scripting language (Scheme)". I looked at the source code. Yes, it is some version of scheme.

So I would need a scheme tutorial, preferably with a step-by-step exercise about writing a card game for aisleriot. Because of course I wish to use the existing libraries, not code the game from scratch.

Gnome's devel web site speaks about javascript, not scheme. The game files I looked at, the files containing the rules for the different games, are uncommented. I could not make car or cdr (= "head or tail" in scheme-speak) of them.

So, please, does any one know where I could find a good tutorial? Or at least a good manual? (NOT the MIT gibberish).

Alain Reve
  • 217
  • 1
  • 4
  • 18

1 Answers1

1

From the official source code git repository itself:

https://gitlab.gnome.org/GNOME/aisleriot/blob/master/games/Rules.HOWTO

Its table of contents is very promising, and it looks like it's exactly what you're looking for:

1. Introduction
2. Getting started.
3. A primer for the Scheme language
4. Functions you need to define to make a game.
5. A real example.
6. Submitting your new work as a "bug". 
7. A brief list of the aisleriot 'library' functions available. 

Also worth reading:

https://gitlab.gnome.org/GNOME/aisleriot/blob/master/games/README

How to write a new game for Aisleriot
=====================================

For an introduction on how to write the scheme code for a new game see the
Rules.HOWTO file.


How to add a new game to Aisleriot
==================================

 * Move foo.scm file into games/ and git add it
 * Add foo.scm to the list in games/Makefile.am, keeping the list
   sorted alphabetically
 * Add games/foo.scm to po/POTFILES.in
 * Move the documentation foo.xml file into help/C/ and git add it
 * Add foo.xml to HELP_FILES in help/Makefile.am, keeping the list
   sorted alphabetically
 * Edit help/C/index.docbook to include the new game's documentation
   by adding

     <xi:include href="foo.xml" />

   in the list of games. Make sure to keep the list sorted alphabetically!
 * Run the src/get_titles.pl script
 * In help/, run "make check" to make sure the documentation validates
 * Add foo to the list of games in the man page in help/sol.6
 * git commit help/C/foo.xml help/C/index.docbook help/Makefile.am games/foo.scm \
              games/Makefile.am src/game-names.h po/POTFILES.in help/sol.6

 Done!

Unfortunately, and surprisingly, both docs are missing from aisleriot Ubuntu binary package in the repository, so they're not installed in your system as most such READMEs are.

MestreLion
  • 20,726