INTRO:

This program is my attempt at a euchre game.  See the file INSTALL for
info on building and running euchre.

Euchre is a card game played with the 9s, 10s, Jacks, Queens, Kings,
and Aces of all 4 suits.  Each player is dealt 5 cards, leaving 4
cards in the deck.  The top card of the remaining 4 is then turned
over and this is the trump candidate.

Trump is decided in two stages.  In the first, each player (starting
to the left of the dealer) has the option to bid 'pass' or 'pick it
up'.  If the player bids 'pass', the next player gets a shot.  If one
player bids 'pick it up', the dealer takes the top card into their
hand and places one card from their hand face down on top of the deck.
The auction is now over, and play begins as described below.
Otherwise, the second stage begins.  In this stage each player (again
starting to the left of the dealer) has the option to 'pass' or to
call their own trump suit.  The player may not, however, call trump to
be the suit of the card that was turned up during the first stage.  If
a player names a trump, then play begins as described below.
Otherwise, the hand is a wash.  The cards are collected from all
players and the deal is passed to the dealer's left.

The basic game play is very similar to spades or bridge.  Basically
the highest card played wins unless trump is played in which case the
highest trump wins.  The only thing a little weird about euchre is
that the Jack of the trump suit is the highest trump and the Jack of
the trump partner suit (Spades and Clubs are partner suits and
Diamonds and Hearts are partner suits) is the second highest trump
(then the Ace down through 9 as normal). 

The player to the left of the dealer leads the first card, and
subsequent tricks are led by whomever won the previous trick.  After
all five tricks are played the hand is over.

Scoring is done according to the following rules.  If the caller and
his partner won 5 tricks, they get 2 points.  If they got 3 or 4
tricks, they get 1 point.  Otherwise, the other team gets 2 points for
the set.

There is also the option for the caller to go 'loner'.  This means the
caller's partner does not play.  Other than that the play is the same,
but the scoring has one change.  If the 'loner' takes all 5 tricks,
their team gets 4 points instead of 2.  (NOTE that this is currently
disabled)

Normally, the first team to 10 points in declared the winner.

If this isn't the way you grew up playing euchre, let me know.  I'd
love to add variations esp if they make the game more interesting,
challenging, whatever.

GUI STUFF:

During the auction the dealer's name will be blue, the player whose
bid is next is red (unless it's the dealer in which case it's purple).

While playing a hand the caller's (the person who won the auction)
name is blue, the player whose turn it is to play is red (unless it's
the caller in which case it's purple).

You can also see which player is the dealer and which player is the
caller by looking at the "Round Stats" area of the screen.

The status bar in the bottom of the main window will give you feedback
if you do something invalid (like not following suit) and will tell
you what is expected of you (like bid something or play a card).

OPTIONS:

Game Settings:
	Delay Style - this option lets you set what the game does
	after events (events include everything from after the auction
	is complete to after a round is complete).  These happen very
	often.

	Tricks for one point - this lets you change how many tricks
	must be taken by the team that wins the auction.  The default
	is 3, but for a more challenging game try setting it to 4.
	Note that the computer does not (at this point) take this
	value into consideration when deciding how to bid.

	Points for game - this lets you change how many points you
	need to win a game.  Useful if you've only got a few minutes
	to play a quick game or if you want a long, brutal slug-fest.

	Show Trick Stats - whether or not to show the trick stats
	portion of the main window.

	Show Round Stats - whether or not to show the round stats
	portion of the main window.

	Show Game Stats - whether or not to show the game stats
	portion of the main window.

	Delay Between Plays - when enabled the game will delay for
	aobut 1 second between each AI event (making a bid or playing
	a card).  When disabled there is not delay (which can be
	disconcerting and doesn't "feel" right).

	Play for me when possible - when enabled the computer will
	play for you when there is no choice of cards to play.  The
	only times that will happen is if there is only one card left
	in your hand or you only have one card of the suit led.

	End deal as soon as possible - when enabled the deal will end
	as soon as it is determined that the end result is no longer
	in question.  The only times this will happen are when the
	defending team takes enough tricks to win or the team that won
	the auction takes enough tricks to win and the other team
	already has at least one trick.  Note this behavior is
	affected by the "Tricks for 1 point" option above.  (this
	option was sugested by Glen Sanft, glens@mailandnews.com,
	along with many other great suggestions and problem spotting)

	Partner can go loner - when enabled your partner has the
	option to go loner whenever they feel it is appropriate.  When
	disabled your partner will never go loner (if they think they
	should they will just "pick it up" instead).

AI Settings:
	Skill Level - this controls how smart the computer AI is for
	that position.  Ranges from 0 - 2 with 0 being the dumbest and
	2 being the smartest.

	Aggression - this controls how aggressively the computer will
	play.  For skill levels 0 and 1 this currently only affects
	the behavior during the auction, but for skill level 2 this
	affects card playing behavior as well.

	My personal favorite setting is skill level 2 and aggression
	level 1 for all three AIs.  This seems to be a nice balance
	that fits my style of play well.

	For a beginner I would recommend setting the skill level for
	North to 2 (North being your partner) and the skill level for
	East and West to 0.  This is nice because they do stupid
	stuff, but is bad because you won't learn anything from them.

THE PROGRAM:

The code is mostly C++ and uses the GTK+ toolkit (www.gtk.org) for the
widget set.  The interface was built using the very excellent program
glade (glade.gnome.org).  The pixmaps for the card backs were made
using The Gimp (www.gimp.org) and the pixmaps for the cards themselves
were stolen from the kpoker (kpoker.sourceforge.net) game.  The code
attempts to be nicely object-oriented especially in the sense that the
main game engine does not know or care about the details of a player
implementation (human vs computer vs whatever) and the computer can
support multiple AI implementations.  This was mostly accomplished
without too many hacks...

If you care about what else I'm thinking about adding someday, check
out the TODO file.

The code is all GPL (www.gnu.org).  Feel free to hack it up, make fun
of it, use as an example of how not to program, whatever you like.  If
you've got patches, enhancements, comments, or whatever please let me
know.

THE AUTHOR:

Just a lowly, wannabe Linux hacker.  Currently employed at Cisco
Systems where he sits and ponders how big companies with all the
politics and wasted talent ever make money...  Luckily, he's got two
great kids and great wife to keep him happy.

nbuckles@bigfoot.com

UPDATED 12/2005 by Adam Bender, abender@gmail.com, to use stdio in order
to compile on my Mac.  Added to DarwinPorts.
