Cribbage (Java) Readme
======================

The Java Cribbage game allows a user to play against the computer a game of
cribbage.  The rules of Cribbage are beyond this readme.  The game requires
at least Java 1.3 to play.

The game uses a spinner component created by Kevin Mayer (kmayer@layer9.com)
with the latest version (as of 2001-09-28) available at:
  http://www.virturo.com/spinner

This is my first attempt at creating a game in Java, so don't laugh too
much.  Source is available from my web-site at:
  http://pws.prserv.net/usinet.slack
Select the Java link and have at it.

To play, place the .jars into a directory of your choice and from within
that directory execute:
 <> java -cp cribbage.jar;cards.jar;spinner.jar;slack.jar Cribbage
To create a batch (or cmd) file, you can use the following (assuming as above
that the java 1.3(+) vm is on the system path):
--- start
@ECHO Starting Cribbage, please wait...
@rem old way @java -cp cribbage.jar;cards.jar;spinner.jar;slack.jar Cribbage
@rem new way
@java -jar cribbage.jar
--- end

To test the Cribbage game engine, you can also run the $Test.  Use:
 <> java -cp cribbage.jar;cards.jar CribbageEngine$Test
This method massages the engine with a quick and dirty run (2 cards
of a hand) and determines the discards and score of each hand and 
the crib.

You can also 'unpack' the cribbage.jar file into a directory of your choice
and play it outside of the jar.  In either case, if the images or sounds get
moved to another path, edit the cribbage.properties file to indicate the
correct path.  Other options can be changed there as well.

Future Enhancements:
--------------------
- Working on getting the game to run as an applet.  This may or may not
  ever come to pass (when the archives (jars) are accepted, a security
  error is thrown, other-wise 'class not found' exceptions are thrown).
  Also, having a problem getting the java plug-in to work properly.

History:
--------
Version 1.00  2001-09-26 > Completed (finally!!!!)
Version 1.01  2001-09-28 > Added configuration properties file.
Version 1.02  2001-09-29 > Code clean up, turn off debug statements.
Version 1.03  2001-09-30 > Fixed a bug in the way muggins was being
                           processed.
Version 1.04  2001-10-02 > Moved a wait flag in order for the game to end
                           when it is over.
Version 1.05  2001-10-07 > Fixed another 'muggins' processing bug.
Version 1.06  2001-10-08 > Added links to the CribbageHelp class (primative
                           help system).
Version 1.06  2001-10-11 > Completed the first draft of the html help files.
Version 1.06  2001-10-12 > Cleaned up the code for CribbageHelp class and
                           cleaned up the html help files somewhat.
Version 1.07  2001-10-13 > Modified the about dialog to use properties so
                           code doesn't have to be recompiled with changes
                           to other classes.
Version 1.08  2001-10-17 > Fixed a 'minor' problem with the 'last card'
                           processing code if the computer played out his
                           hand.
Version 1.08a 2001-10-30 > Changed the cribbage board event firing to use the
                           'invokeLater' method so the event processing is 
                           done in the event thread.
Version 1.09  2002-01-05 > Modified to use the slack.jar utility classes.
Version 1.09a 2002-03-24 > Moved ImageCanvas into slack.jar.
Version 1.10  2002-03-31 > Whoops!  Forgot the import for the ImageCanvas
                           class after moving it.  Also, set up the jar as
                           an 'executable' jar and embedded all of the jar
                           files dependent on inside.
Version 1.10  2002-04-01 > Aprils Fools!!!  The only VM that seems to support
                           jars in jars is IBM's OS/2 VM.  All others fail
                           to find the classes.  Repackaged moving the 
                           supporting jars once again outside the main jar.
Version 1.10a 2002-06-15 > Sound may be fixed (somewhat).  Was waiting for
                           sound completion in thread by using a boolean
                           flag, changed to using .join() instead to wait
                           for sound thread stop.
Version 1.10b 2002-06-22 > Modified to use new 'centerWindowOnScreen' method
                           in Utilities class.
Version 1.11  2002-06-26 > Modified to use 'new' AboutDlg (additional parameter).
Version 1.12  2002-07-11 > Added properties for 'computer name' and 'player name'.
                           Updated some of the help with edit corrections.
Version 1.13  2002-07-13 > Added a check for 'game over' in computers move thread
                           to fix a problem in which the computer kept playing on
                           even if the game was won by the players move (showed
                           up occasionally).
Version 1.14  2003-08-10 > Changed font in several components so text is not
                           truncated under GCD Java 1.4.1.
Version 1.15  2004-01-21 > Modified CribbageEngine.
Version 1.16  2004-02-28 > Cleaned up code (removed ^Z from source files).
Version 2.00  2005-01-22 > Updated to use cards v2 library, hopefully fixed some thread
                           issues.
Version 2.01  2005-03-25 > Packed up code with slight changes to code since cards v2
                           supports playing cards within Card interface.
Version 2.02  2005-03-28 > Cleaned up more artifacts from cards v2 conversion in
                           CribbageEngine class.
Version 2.03  2005-08-31 > Some more changes per 'findbugs' analysis.
Version 2.04  2005-12-20 > Added 'invokeLater' call to main method.

Known Issues:
-------------
> Probably other thread issues.

<------------------------------------------------------->
 Comments or questions (hopefully no gripes :)) contact:
  Michael G. Slack (slack@attglobal.net)
<------------------------------------------------------->
