Make your own free website on

Hearts 2.0.3

David Skelly
All rights reserved.

This is the classic card game Hearts that I decided to program for the Macintosh. This version of Hearts is freeware, however I would like some feedback. Any comments, questions or bug reports should be e-mailed to with "Hearts" as the subject line. My homepage is
Hearts has been deliberately kept small for the moment to use little memory and disk space while still delivering quality output. It also helps those with 14.4 modems :)

Hearts Rules:
Hearts is a card game for 4 players. The object of the game is have the lowest score when one person gets more than 100 points. The game starts by dealing 13 cards to each player. Players then choose 3 cards from this hand to pass to the person on their left. The person with the 2 of clubs leads on the first trick. Play is standard trick-taking* without trumps until the hand is gone. Players may not lead hearts until they have been "broken" (already played on a previous trick), unless hearts are the only suit left in the player's hand. Playing the queen of spades also breaks hearts.
Scores are calculated at the end of each hand. Every heart taken is worth 1 point. The queen of spades is worth 13 points and the jack of diamonds -10. If a player manages to take all 13 hearts and the queen of spades (called "shooting the moon") then instead of adding 26 points to their score, they subtract 26. Or they may choose to take 0 points and give each of their opponents 26 points.
The game ends when one person gets more than 100 points. The winner is the player with the lowest score. If, however, at the end of the hand a player has exactly 100 points, they are declared the winner.
*Standard trick-taking is described as follows: Players must follow the suit of the card lead. The player who plays the highest card (aces high) of the suit lead takes the trick. If a player does not have a card of the suit lead, they are free to play whatever card they want. The player who takes the trick then leads the next trick.

Hearts can run using very little memory. If virtual memory is turned on, this requirement is even less. Hearts requires System7, color quickdraw, and at least 200k of memory to run. Hearts will still run on a monochrome monitor as long as color quickdraw is available.
The menus in Hearts should be pretty self-explanatory. Before exiting the program, users are asked if they want to save their player. A player's game statistics and options are stored in this file. Players that have a file are automatically saved thereafter before quitting. The Player Left, Player Right, and Player Across menus only change the name of the players being played against. Hearts games can be customized using the options dialog. NOTE: Some options do not become active until the game a new game is started. For instance, setting the Jack is 0 Points option will only affect games that are started after it is checked/unchecked.
---- game customizations ----
Disable Sound- this turns off the sounds in the game
Keep Background - the black background window will not disappear if you switch to another
Clear Trick W/Mouse - at the end of each trick, the cards stay on the table until the mouse is
clicked (useful if you need more time to examine the cards played)
Disable Checkering- the game attempts to keep your cards arranged by suits
black/red/black/red, and if this option is checked then cards are arranged
Auto Rearrange Hand - this centers the hand after each card is played (may go slow on older
Hilight- Striped/Inverted/Outline - the hilighting style of a playing card that is clicked on
---- rule customizations ----
Rotate Lead - the lead rotates between the players instead going to the 2 of clubs
Jack is 0 Points - the jack of diamonds counts as 0 points, not -10
Don't Pass 3 - at the beginning of a hand, no cards are passed
Taking 0 Tricks is -5 - if you haven't taken any tricks at the end of a hand, you get -5 points
Queen Doesn't Break Hearts - playing the queen of spades does not break hearts
Allow Bleeding on the First Trick - players can play hearts or the black lady on the first
Game To - sets the score that ends the game
CPU Pause Time - the delay in ticks (1/60 of a second) between the computer players' moves
Messages - the delay in seconds before the message on the screen disappears
Clicking the default button will set the dialog to the 'standard' rules.
Choosing Finish Hand from the game menu will play out the rest of the hand as a computer player would. This can be canceled by choosing Finish Hand from the game menu again. Control-clicking a card will also play out the rest of the hand.
The statistics window shows the stats for the current player. QJ Same Trick/Hand is the queen of spades and jack of diamonds taken on the same trick/hand. Sortof an interesting statistic. Cover/Didn't Cover is used with the jack of diamonds. If you are 3rd to play in a trick and you play a diamond higher than the jack and the player to your left has the jack in his hand, you 'covered'. If you are 3rd to play in a trick and you have a diamond higher than the jack in your hand but you don't play it and the player to your left plays the jack, you 'didn't cover'. Clicking on the 'Average' button calculates each stat divided by number of games played.
Shooting the Moon- When you shoot the moon, you will be given the choice between subtracting 26 points from your score, or adding 26 points to everybody elses score. The computer will usually choose to subtract 26 points from its score.

System Requirements:
Hearts requires a 68k or PPC Macintosh running System7, color quickdraw, and at least 200k of memory. Hearts will still run on a monochrome monitor as long as color quickdraw is available. Hearts may/should work on System6 as well, however, it has not been tested on this system. In fact, I have not been able to test Hearts on that many older systems at all. If you find any problems, please give me an e-mail and I will try to fix it.

Thanks to my (semi) beta tester JP for testing this thing out. Thanks to Troy Gaul for his floating windows Windoids. Thanks to Macintosh C: A Hobbyist's Guide to Programming the Mac OS in C for helping me get Troy's windoids to actually float. This program was written in C with Codewarrior.

This program is distributed as is. I, the author, am not responsible for any direct or indirect damage this program might do to your computer. This program may be distributed (on CD's or other media as well) as long as this notice and any other files accompanying the program original are included. All rights reserved. ©2000 David Skelly

By using ResEdit or any other resource editing program, you can change the player names in the menus to ones you like. Also, you can add your own card designs by pasting in pictures. Change the ID of the picture so that it is greater than 200, but there are no gaps between ID's greater than 200 and your ID. (e.g. if there are pictures with ID 200,201,202, make yours 203). Change the name of the 'PICT' resource to something descriptive and then run the program. If you don't name the picture, it will not be shown in the menu. Your picture should now be available in the Card Design menu. Always remember to work with a copy before editing resources. If you do alter the program in any way, do not distribute the altered copy.

David Skelly
HardScrabble Rd
Lyme, NH 03768

Original file name: Read Me + Manual - converted on Sunday, 2 July 2000, 17:07

This page was created using TextToHTML. TextToHTML is a free software for Macintosh and is (c) 1995,1996 by Kris Coppieters