Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]

Arc de Triomphe clipart (2486 bytes)Solitaire Framework


Written by David Raines.

solitaire_framework.tar.gz (432,005 bytes)


Introduction

This is an object-oriented framework for the development of solitaire card games. It is written in ISE Eiffel version 3.3.7 and has been tested only on Sun workstations running Solaris 2.4 and 2.5.x.

The included paper "Documenting Frameworks: Solitaire is not Alone" which documents this framework is co-written by Dr. Jim McKim and myself, however it should be noted that I am the sole author and designer of the framework and all associated software.

This distribution contains the following directories and files:

solitaire
This directory contains the framework source.
seahaven
Source for the Seahaven solitaire game.
canfield
Source for the Canfield solitaire game.
bitmaps
X11 bitmap files used by the framework
docs
This directory contains a postscript version of the
paper
"Documenting Frameworks: Solitaire is not Alone" by David Raines and Jim McKim. This paper documents the design and use of the framework.

Building the Games

To compile either Seahaven or Canfield, cd into the appropriate directory (either seahaven or canfield) and run `ebench'. Choose the current directory as the project directory and choose the file "Ace" for the Ace file. Then either melt or freeze.

To build new solitaire games

See the text entitled "Documenting Frameworks: Solitaire Is Not Alone" for an example of creating a new solitaire game. A postscript version is in the docs directory. Very briefly, create a subclass of the game class to define the game layout. Create the root class by inheriting from that class and the VGame class. Create subclasses of Pile as needed to define rules of moving cards. Finally create a subclass of the Configuration class and the configuration.txt and help_text.txt files.

Playing the Games

Choose "New Game" from the "Game" menu. The cards will be dealt into the appropriate piles. The "Instructions" item from the "Help" menu on the main windows menu bar displays the contents of the "help_text.txt" file in a scrolling text window. This text is intended to explain the rules of the game.

The "configuration.txt" and "help_text.txt" files and the "bitmaps" directory MUST be in the current directory when you run the program.

In this distribution, the bitmaps directories in the seahaven and canfield directories are actually symbolic links to "../bitmaps". If your system does not support symbolic links, you will need to copy this directory to the subdirectories.

Licensing

Copyright 1997 by David Raines.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of David Raines not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. I make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

David Raines


Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]