1INTRO: 2 3This program is my attempt at a euchre game. See the file INSTALL for 4info on building and running euchre. 5 6Euchre is a card game played with the 9s, 10s, Jacks, Queens, Kings, 7and Aces of all 4 suits. Each player is dealt 5 cards, leaving 4 8cards in the deck. The top card of the remaining 4 is then turned 9over and this is the trump candidate. 10 11Trump is decided in two stages. In the first, each player (starting 12to the left of the dealer) has the option to bid 'pass' or 'pick it 13up'. If the player bids 'pass', the next player gets a shot. If one 14player bids 'pick it up', the dealer takes the top card into their 15hand and places one card from their hand face down on top of the deck. 16The auction is now over, and play begins as described below. 17Otherwise, the second stage begins. In this stage each player (again 18starting to the left of the dealer) has the option to 'pass' or to 19call their own trump suit. The player may not, however, call trump to 20be the suit of the card that was turned up during the first stage. If 21a player names a trump, then play begins as described below. 22Otherwise, the hand is a wash. The cards are collected from all 23players and the deal is passed to the dealer's left. 24 25The basic game play is very similar to spades or bridge. Basically 26the highest card played wins unless trump is played in which case the 27highest trump wins. The only thing a little weird about euchre is 28that the Jack of the trump suit is the highest trump and the Jack of 29the trump partner suit (Spades and Clubs are partner suits and 30Diamonds and Hearts are partner suits) is the second highest trump 31(then the Ace down through 9 as normal). 32 33The player to the left of the dealer leads the first card, and 34subsequent tricks are led by whomever won the previous trick. After 35all five tricks are played the hand is over. 36 37Scoring is done according to the following rules. If the caller and 38his partner won 5 tricks, they get 2 points. If they got 3 or 4 39tricks, they get 1 point. Otherwise, the other team gets 2 points for 40the set. 41 42There is also the option for the caller to go 'loner'. This means the 43caller's partner does not play. Other than that the play is the same, 44but the scoring has one change. If the 'loner' takes all 5 tricks, 45their team gets 4 points instead of 2. (NOTE that this is currently 46disabled) 47 48Normally, the first team to 10 points in declared the winner. 49 50If this isn't the way you grew up playing euchre, let me know. I'd 51love to add variations esp if they make the game more interesting, 52challenging, whatever. 53 54GUI STUFF: 55 56During the auction the dealer's name will be blue, the player whose 57bid is next is red (unless it's the dealer in which case it's purple). 58 59While playing a hand the caller's (the person who won the auction) 60name is blue, the player whose turn it is to play is red (unless it's 61the caller in which case it's purple). 62 63You can also see which player is the dealer and which player is the 64caller by looking at the "Round Stats" area of the screen. 65 66The status bar in the bottom of the main window will give you feedback 67if you do something invalid (like not following suit) and will tell 68you what is expected of you (like bid something or play a card). 69 70OPTIONS: 71 72Game Settings: 73 Delay Style - this option lets you set what the game does 74 after events (events include everything from after the auction 75 is complete to after a round is complete). These happen very 76 often. 77 78 Tricks for one point - this lets you change how many tricks 79 must be taken by the team that wins the auction. The default 80 is 3, but for a more challenging game try setting it to 4. 81 Note that the computer does not (at this point) take this 82 value into consideration when deciding how to bid. 83 84 Points for game - this lets you change how many points you 85 need to win a game. Useful if you've only got a few minutes 86 to play a quick game or if you want a long, brutal slug-fest. 87 88 Show Trick Stats - whether or not to show the trick stats 89 portion of the main window. 90 91 Show Round Stats - whether or not to show the round stats 92 portion of the main window. 93 94 Show Game Stats - whether or not to show the game stats 95 portion of the main window. 96 97 Delay Between Plays - when enabled the game will delay for 98 aobut 1 second between each AI event (making a bid or playing 99 a card). When disabled there is not delay (which can be 100 disconcerting and doesn't "feel" right). 101 102 Play for me when possible - when enabled the computer will 103 play for you when there is no choice of cards to play. The 104 only times that will happen is if there is only one card left 105 in your hand or you only have one card of the suit led. 106 107 End deal as soon as possible - when enabled the deal will end 108 as soon as it is determined that the end result is no longer 109 in question. The only times this will happen are when the 110 defending team takes enough tricks to win or the team that won 111 the auction takes enough tricks to win and the other team 112 already has at least one trick. Note this behavior is 113 affected by the "Tricks for 1 point" option above. (this 114 option was sugested by Glen Sanft, glens@mailandnews.com, 115 along with many other great suggestions and problem spotting) 116 117 Partner can go loner - when enabled your partner has the 118 option to go loner whenever they feel it is appropriate. When 119 disabled your partner will never go loner (if they think they 120 should they will just "pick it up" instead). 121 122AI Settings: 123 Skill Level - this controls how smart the computer AI is for 124 that position. Ranges from 0 - 2 with 0 being the dumbest and 125 2 being the smartest. 126 127 Aggression - this controls how aggressively the computer will 128 play. For skill levels 0 and 1 this currently only affects 129 the behavior during the auction, but for skill level 2 this 130 affects card playing behavior as well. 131 132 My personal favorite setting is skill level 2 and aggression 133 level 1 for all three AIs. This seems to be a nice balance 134 that fits my style of play well. 135 136 For a beginner I would recommend setting the skill level for 137 North to 2 (North being your partner) and the skill level for 138 East and West to 0. This is nice because they do stupid 139 stuff, but is bad because you won't learn anything from them. 140 141THE PROGRAM: 142 143The code is mostly C++ and uses the GTK+ toolkit (www.gtk.org) for the 144widget set. The interface was built using the very excellent program 145glade (glade.gnome.org). The pixmaps for the card backs were made 146using The Gimp (www.gimp.org) and the pixmaps for the cards themselves 147were stolen from the kpoker (kpoker.sourceforge.net) game. The code 148attempts to be nicely object-oriented especially in the sense that the 149main game engine does not know or care about the details of a player 150implementation (human vs computer vs whatever) and the computer can 151support multiple AI implementations. This was mostly accomplished 152without too many hacks... 153 154If you care about what else I'm thinking about adding someday, check 155out the TODO file. 156 157The code is all GPL (www.gnu.org). Feel free to hack it up, make fun 158of it, use as an example of how not to program, whatever you like. If 159you've got patches, enhancements, comments, or whatever please let me 160know. 161 162THE AUTHOR: 163 164Just a lowly, wannabe Linux hacker. Currently employed at Cisco 165Systems where he sits and ponders how big companies with all the 166politics and wasted talent ever make money... Luckily, he's got two 167great kids and great wife to keep him happy. 168 169nbuckles@bigfoot.com 170