by David Teach
Copyright (c) 1991-2004
Requirements / Recommendations to play
EGA, VGA, MDA, AT&T 400, PC 3270, or Hercules graphics system required.
A Microsoft, Logitech, or compatible mouse is recommended.
Three button rodents work better for the hint feature.
An IBM or compatible AT computer with 8 mHz or faster CPU speed is also recommended.
How to play this computer game
When using the mouse, commands are selected with either the Left or Right mouse buttons. When in keyboard mode, the numbers or letters for the commands are highlighted in light green. For 2 color systems, the active keys have a line drawn under them.
***** If the mouse cursor is not present in the Options, High Scores, or Statistics screens, then you have a problem with your mouse driver not accessing the second video page. Get an updated mouse driver, or use the NOBLANK command line option to disable video paging.
***** Monochrome EGA/VGA and/or 64k EGA users: If the colors don't come out correctly or if you cannot go to the Options or Stats screens, try using the LAPTOP command line parameter. I set this up to force the program into 2 color/1 video page on these systems. With all other configurations the LAPTOP toggle works normally.
The Title Screen:
BEGIN GAME -
Typing 'B' or clicking the left or right mouse button on the BEGIN GAME box starts the game with the shown options. Hitting ENTER will also choose this.
Typing 'O' or clicking on OPTIONS will bring up the game Options Menu. (see below)
HIGH SCORES -
This displays the top 20 high scores list.
This displays the current player's cumulative game statistics.
QUIT will exit the program.
The Options Menu:
MAIN MENU -
This option will bring you back to the main menu. (Title screen) You can hit either the letter M or the ENTER key to select this in keyboard mode.
The default name is 'PLAYER'. You can change this by typing 'N' or clicking the mouse pointer within the red box around the name, typing a new name, and pressing ENTER (or a mouse button). Backspace is the only editing key allowed if you make an error while typing in the name. Upper and lower case letters, numbers 1 through 9, characters !, " - : / ?, and spaces are also allowed. The name can be a maximum of 8 characters long.
Next to the player's name is a question mark that when clicked on will list all the players in the statistics file so that you can look up a name that was used before without having to remember it.
GIN SCORE -
This is the amount of points that a player scores when he win a hand with a GIN. Usually this is 25 points but some people use 10, 15, or 20 points. The 'U' key toggles the option between them.
This is the amount of points that a player scores when he undercuts the other player's knock. Usually this is 25 points but some people use 10, 15, or 20 points. The 'U' key toggles the option between them.
SCORE LIMIT -
Clicking on SCORE LIMIT cycles the maximum score to play to by 50 points, from 0 to 500. The LEFT mouse button, or '+' INCREASES the score by 50; and the RIGHT mouse button, or '-' DECREASES the score.
Changing the OKLAHOMA option to YES will play the game by Oklahoma rules. (see rules below) The double points on a spade as first upcard is still in effect even if knocking is disabled. The 'O' key toggles.
BIG CARDS -
The default card set has more realistic-looking cards, but the suits may be a little small for some people to see clearly. If this is so, or you just like the one pip better, changing this option to YES will give you cards with one big number and one big symbol for the suit. Hit the letter 'B' to switch this option to YES or NO.
EASY GAME -
If the computer consistently pounds on you, toggle EASY to YES. This will make the computer always pick the largest value unused card in its hand for discarding instead of following its better choosing formulas. The 'E' key selects this option from keyboard.
If this option is YES, you are allowed to knock if possible. (See knock rules below) Otherwise you must GIN to win a hand. If knocking is disabled, a zero will be drawn for the knock card value instead of the normal knock value. Type 'K' to toggle knocking on or off.
Clicking on this option will change the shape of the mouse pointer. There are seven different shapes to choose from. Obviously, this will not have any effect if you are not using a mouse, but 'P' still works.
SORT BY -
'R' from Keyboard. This toggles the sorting of cards in your hand:
RANK = Unmatched cards are arranged highest to lowest, regardless of suit. Cards of same value are then arranged by suit.
SUIT = Unmatched cards are arranged highest to lowest within the four possible suits. Order: Spades, Hearts, Diamonds, Clubs. (Bridge)
Selecting SAVE will save all options to the GINRUMMY.CFG file. This file is loaded when the program is run, so your name and favorite options are already set. If this file is not present, or is corrupted, it will be created with the default options. At present, the NOBLANK option is not saved in this configuration file. 'S' from the keyboard.
Player Statistics Screen:
Clicking within the Main Menu box will bring you back to the main menu. (Title screen) You can hit the letter M or the ENTER key to select this in keyboard mode.
The Statistics file -
Also at the end of each game, the program checks for a stats file called GINRUMMY.STA in the current directory. If it is not there, it is created. This file saves cumulative totals for average score per hand against the computer, the total number of games won and lost, the total number of hands played and the player's name. If your stats file is corrupted, or you just want to clear the list and start over, erase (or rename) the GINRUMMY.STA file. You can have up to 20 different names currently running in this stats file. If the current player name is not found in this file, it is added to the top of the file with zero totals. WARNING, if this addition makes more than 20 names, the name on the bottom of the list (the oldest) is truncated. Hands played to a draw ARE counted in this. Games played to a draw (only possible if zero score limit, or when quitting a game after one draw) are also counted.
******* If you quit a hand before the END of the game, the stats file WILL be updated if there was at least one hand played to a finish.
******* If you are playing GinRummy on a write-protected or read-only drive, the stats will start from zero when you start the game; they will be kept for when you are in the program, but cannot be saved upon exit.
Game Play -
To start play, a player must draw a card from either the Deck or the Discard pile. To do this, click the mouse pointer on the deck or on the discard pile on the playing screen, OR click on the words DECK or on DISCARD PILE in the red boxes at the bottom of the screen. In keyboard mode, type the highlighted letters 'D' for DECK, or 'P' for DISCARD PILE to choose.
You then must choose a card to discard. Click the mouse pointer on the card in your hand that you want to discard (the card you want to replace with your drawn card). To do this in keyboard mode, the numbers 1 2 3 4 5 6 7 8 9 0 appear under your hand. Choose the number under the card you want to discard, or you can discard the drawn card by clicking on the discard pile, on the words DRAWN CARD in the red box at the bottom of the screen, or type 'D' in keyboard mode. If the drawn card is taken from the discard pile, you can undo the draw by clicking on the card drawn, or within box around UNDO, or by typing 'U' on the keyboard. You cannot UNDO a draw from the deck or a discard from your hand since this could be used to cheat by a tempted player. After you discard, the computer will draw and discard.
Play continues until one of you gins, knocks, or draws the second to the last card in the deck. You can also type 'Q' or click on the QUIT option in a red box at the bottom right of the screen to return, upon confirmation, to the title screen. Double-clicking on the QUIT option will also send you to the title screen. If after you discard, the total points remaining in your hand are equal to or less than the knock value, you will be asked if you want to knock. Click on YES, or on the knock card to end the hand by knocking. Click on NO, or on the discard pile to continue the hand without yet knocking. If you select the 'Play to Gin' box, you will play that hand until gin is reached by you, or until the computer gins or knocks. You cannot knock again until the next hand, but the computer still can. Keyboard mode highlights the 'Y' and 'N' for choosing yes or no, or 'P' to play to gin. If you have disabled knocking or have selected 'Play to Gin' earlier in the hand, this question will not appear.
After one of you wins a hand, scores are accumulated until reaching the limit set in the options menu, whereupon one of you wins the game. You can then play again from zero, or quit to the main intro menu.
The Color Bars -
To help you see how your cards are arranged, the computer will draw colored bars above your matched cards. The computer sorts the cards in your hand into the arrangement that gives you the lowest deadwood score (or it tries to). Above all cards in your hand that are matched into sets of 3 or 4 of a kind, a BLUE bar will be drawn. Above the cards matched into a run will be drawn a GREEN bar.
If the COMPUTER player draws from the discard pile instead of the deck, a RED bar will be put over the discard pile until the next turn. This means that the computer took the card that you just discarded. Since the computer goes so fast, this is done to simulate a more realistic play in which you can see from where your opponent draws.
Also, if a player Knocks, and the other player can lay off some deadwood on the knocking player, a RED bar will be drawn over (or under) all the laid off cards.
When you ask the computer to give you a hint on drawing a card or when choosing a discard, a YELLOW bar will be placed over the card that he recommends for you to select.
The center button (recommended), or both left and right buttons pressed simultaneously will ask the computer for a hint. When using the keyboard, the letter H brings up the hint suggestion.
CAREFUL: if you are using both left and right mouse buttons to ask for hints, you must make sure that the mouse pointer is NOT OVER a regular choice area, (deck, card in hand, quit, etc.) or else the game will usually think that you made a normal choice with a single button. If you have a center button, use that instead; this will work for hints ANYWHERE on the screen, even over normal choice areas.
IF YOU HAVE A THREE BUTTON MOUSE, BUT THE CENTER BUTTON DOESN'T DO ANYTHING, you probably are using a different mouse driver than the one which came with your mouse. A three button mouse MUST be driven by a three button mouse driver. Most of the Microsoft mouse driver programs are for two button rodents. They seem to work fine for all operations of the mouse except for the center button. If you have a problem, look around the BBS's for a newer mouse driver, (I use Logitech mouse driver version 6.24) or contact the company where you purchased your mouse.
The Screen Saver -
If no keyboard or mouse input is detected for a certain amount of time during the game, the screen will blank out to prevent burn-in. The time limit for this is set by the game score limit. The time of waiting is two seconds per score limit point; which means that a limit of 100 will blank the screen in 200 seconds (3 minutes, 20 seconds), and a limit of 600 points will wait 20 minutes (1200 seconds). The minimum time is one minute, even if the score limit is set to zero. If your favorite score limit does not match your wanted screen saver time, learn to live with a compromise.
To activate the screen blanker immediately, move the mouse cursor into the upper right hand corner and the screen will automatically blank out. This can be handy for the traditional use of a "Boss key" function. In keyboard mode, the ESCAPE key is the activation key.
*** To get out of the blank screen, press any key or mouse button. ***
*** NOTE: NO SCREEN BLANKING WILL OCCUR IF THE NOBLANK OPTION IS ON. ALSO, SINGLE PAGE VIDEO CARDS (AT&T 400, PC3270, 64K EGA) CAN NOT SUPPORT THE SCREEN SAVER AT THIS TIME. FOR THESE, THE NOBLANK OPTION IS HARDCODED AS 'TRUE' (ON).
The Score file -
At the end of each game, the program checks for a score file called GINRUMMY.SCR in the current directory. If it is not there, it is created. This file saves your 20 best average scores (the final score divided by the number of hands played). Also saved is your name (you must use the command line name option, or change the default player name if you don't want 'PLAYER' saved as your name), the final score, the score limit, the number of hands played, whether the Oklahoma option is on or off (Y or N), and the date the game was played. Scores are not saved for the Computer player. If your score file is corrupted, or you just want to clear the score list and start over, erase (or rename) the GINRUMMY.SCR file. Zero average scores (lose or draw) are not saved.
******* If you quit a hand before the END of the game, the score file WILL be updated for the hands that were played only if the score of the human player is greater than zero.
Notes on the Computer player
The computer does NOT "cheat" when playing. It does not look at the deck before choosing to draw, it does not look at your hand, or do any other thing that a human player cannot do. The computer chooses its discard by a set of fixed formulas that do not have any room for human "intuition" or for many of the different possible arrangements of the hand that might make a good human player choose a different card than the computer.
The "Hint" function uses about the same formulas for choosing a player's selection that the computer uses for its moves. This means if you depend too heavily on the hints, you will end up winning only about half of your games. (During about 500 hands of play testing I have around a 59% winning percentage since keeping statistics.)
Command Line Options:
The default setting for the two options NAME and SCORE LIMIT can be set from the command line, overriding (but not overwriting) the configuration file settings. This can be handy to set up some batch files for different players on one machine.
At the DOS prompt, you can do the following:
To get a quick help screen for the command line options, type GINRUMMY followed by /? or ? or help or HELP. This must be the first parameter.
To list all of the contents of the statistics file from the DOS prompt, (in case you forget who is in there) type: GINRUMMY list
To list the contents of this documentation file from the DOS prompt, (in case you can't view it any other way) type: GINRUMMY view
**** NOTE: The previous three command line parameters (help, list, view) must be the FIRST parameter given, and all will exit to DOS when done.
To set the SCORE LIMIT: GINRUMMY nnn (where "nnn" is a number from 000 to 999) Example: GINRUMMY 234
For numbers less than 100, you MUST use leading zeros. ex. 025
If the limit is 0, then exactly one hand will be played, even if it ends in a draw.
To have the game use your name instead of the default name, you can state it as a command line option. Example: GINRUMMY Dave
For the Command line option of Player Name, the length limit is 8 characters and the name must be ONE word. You can use BobSmith, or Ron-Hill, etc., but typing Paul Schoenberger will give you Schoenbe for your name. If you want a space in your name, you can put one in only with the Name Change from the options menu.
The name used is the LAST word on the command line that is NOT otherwise recognized as a command, so be sure not to have any gibberish on the line when you start the game: GINRUMMY Mike ASDF will make your name ASDF not Mike.
This option will disable all disk access that the program uses. That includes both loading and saving of statistics, options, and high scores. The high scores box will do nothing, but the statistics will still work for the current session (starting at zero), but will not be saved upon exit of the program (or when changing the player's name).
To disable the screen saver function, use the word NOBLANK in your command line options. This parameter will also disable the manual screen blanking (boss key), since both are really the same function.
This option will disable all keyboard input for the game except for when changing the player name in the options menu. This option will only work if there is a mouse detected, otherwise what's the point.
If you have a monochrome monitor, like on most older LCD laptop computers, the switch LAPTOP will use a brighter shade for some of the colors and for any highlighted letters to make them easier to see. If a monochrome graphics card is detected by the game, this option will be used automatically, so this switch is only necessary when you have a monochrome monitor hooked up to a color graphics card.
To go directly into the game, bypassing the intro screen, use the command GO from the DOS prompt. Example: GINRUMMY John B:\ go
If you want to have the configuration and save files read and saved from or to a different drive or directory, you may specify a file path on the command line. Valid paths must start with a backslash (\) or a drive letter and colon (B:) or parent directory dots (..)
Valid path examples are:
If just the drive letter is given, then the current path is used on that drive. (meaning if you are in D:\GAMES and then change to drive C: and run "GINRUMMY D:" then your game files will be saved in D:\GAMES.
As always, if a path not is specified, the current directory is used. If a path is given, it is tested at game startup, and if it is invalid for any reason, the current directory will be made the default path.
Since the game looks only at the first seven parameters given, too much garbage on the command line might miss a legitimate option: GINRUMMY 1 2 3 4 5 6 7 GO will NOT execute the GO command.
These options can be put in any order and are all case INsensitive, except for the Player Name.
If you are using Window 95/98 and running the game using a shortcut, it is almost as easy to specify command-line parameters. Just right-click on the program's shortcut icon, select PROPERTIES, and edit the TARGET line (where it gives the path to the *.EXE file) to put whatever you want behind it, separated by spaces. You can even create more shortcuts for different user names or other options. After that, whenever you click the shortcut, it will run those options for you, overriding the defaults saved in the options menu of the game.
Rules of the Game - Taken from "Official Rules of Card Games", 62nd edition, U.S Playing Card Company, 1968
Rank of cards:
(High) K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2, A.
Value of cards:
Face cards 10, Ace 1, other cards their pip value.
Each player is dealt 10 cards, the next card is turned face up, forming the discard pile. The rest of the deck is placed beside it, face down.
Object of play:
To form MATCHED SETS, consisting of three or four of a kind, or sequences of three or more cards of the same consecutive rank in the same suit.
The human player and the computer take turns by drawing a card from either the deck or the top of the discard pile, then choosing a card from their hand to discard. In this game, you always go first. Players alternate until:
1) A player can GIN.
2) A player KNOCKS.
3) Only 2 cards are left in the deck.
If only two cards remain in the deck at the start of a turn, a player may choose a card from the discard pile and continue his turn; but if either player draws from the deck, the hand is a draw. No points are scored for a draw hand, but it counts as a game played. The cards are then re-shuffled and dealt again for a new hand.
The number of cards remaining in the deck is shown as a small white number on the top of the deck. If the number or cards left is 7 or lower, the number on the deck will be red instead of white.
If, after discarding, all of the remaining cards in the player's hand are formed into matched sets, the player has GIN. This scores 25 points, plus the value of his opponent's unmatched cards (deadwood).
A player can KNOCK if, after discarding, the total of his unmatched cards is 10 points or less. He does not have to knock when able to do so. After knocking, the hand is over, and both players count the points of their unmatched (deadwood) cards. The other player (non-knocking) does not count the points of any deadwood card he can play on the knocking player's MATCHED SETS. This is called LAYING OFF. The knocking player CANNOT lay off any of his deadwood cards, and the player laying off CANNOT alter his or his opponent's matched sets in order to lay off more cards, or combine his and the other player's deadwood cards to form matched sets. If, after laying off, the knocking player has FEWER points than his opponent, he scores the difference in points. If the non-knocking player has LESS or SAME points than his opponent, he has UNDERCUT him and scores 25 points, plus the point difference in unmatched cards.
(If you can't remember all this, don't worry; the computer does all the laying-off, counting, and rule enforcement for you.)
If the Oklahoma option is on, play is the same except that the value of the first card on the discard pile (the upcard), determines the knock value, whether it is taken or not. That means, if the first upcard is a 5, then the players can only knock if they have 5 points or less in deadwood cards. If an ACE is the first upcard, a player must GIN to win the hand. If the first upcard is a SPADE, all points scored in that hand are DOUBLED. To remind you if this, a RED box will be drawn around the knock card when the first upcard is a spade.
Play continues until a player's accumulated score is greater or equal to the agreed scoring limit, usually 100. You can then quit the game or play a new game from zero.
This program is written in Turbo Pascal Version 7.0 for DOS
The Mouse code is from the book "Turbo Pascal Advanced Programmer's Guide" by Stephen K. O'Brian. This unit was slightly modified by me.
Please feel free to write me if you have any questions, comments, improvements, or find any bugs.
When writing to me please tell me where you obtained GinRummy, and be sure to include the version number of the game that you currently have.
Return to the GinRummy DOS Home Page