home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
catalogs
/
mtchplay.zip
/
MTCHPLAY.DOC
< prev
next >
Wrap
Text File
|
1993-02-14
|
9KB
|
180 lines
MTCHPLAY
Probably the most common form of golf competition among ordinary
golfers is 'match play', in which each hole is a separate contest,
with the winner of the match being the player winning the most holes.
To make the contest reasonably fair, in the case of players of
different abilities, the weaker player is awarded a number of strokes,
depending on the difference between the two player's handicaps; these
strokes are awarded on the hardest holes on the course being played.
In the case of a foursome, there are frequently six such matches being
played at the same time, with each member of the group competing with
each other member.
It would seem reasonable to have a tournament along the same lines,
with each player competing at match play with each other player.
Unfortunately, the scoring problems are horrendous - if there are 20
players, for example, there will be 190 separate matches, each requiring
the comparison of net scores on 10 to 18 holes, with the 'net' values
variable, depending on the relative handicaps of the players.
While scoring such a tournament would be horrendous for people, it is a
simple matter for a computer, and MTCHPLAY is a program for doing this.
(MTCHPLAY will also score the tournament by gross or net scores, or by a
commonly used point system.)
The program requires an IBM compatible computer with 640K memory, plus
a printer if hardcopy is desired. A hard disk is not necessary but is
a real timesaver, since the program does a lot of updating of its
data files. A color monitor adds a lot to the display.
It is assumed that the tournament field is divided into at most 10
flights (0,1,...9), with each flight containing at most 24 players.
These numbers are more or less arbitrary, and could be changed if
desired (having bigger flights might require doing without some of the
on-screen displays, simply because the normal PC screen has only 25
lines). At the maximum size, the computer is called on to score 2760
separate contests, which would take people several hours but can be
done in just a few seconds by a reasonably fast PC.
The program requires an entry list file in the following format:
One or more blank lines, then a tournament title if desired. The
title must begin with a letter; e.g. 'Feb 19 Tournament' is ok,
but '19 Feb Tournament' will cause an error.
One or more blank lines, if desired, then the list of par values of
the holes of the course being played.
One or more blank lines, if desired, then the list of handicap numbers
of the holes of the course being played.
Exactly one blank line, then the list of tournament entrants.
Hereafter, blank lines are used only to separate flights, with exactly
one blank line between every two flights. The entrants should be
given in the form lastname, comma, first names or initials. Each name
should be followed, on a separate line, with the player's handicap.
Each player must have a handicap; if no official handicap is available,
a temporary handicap should be assigned, indicated by a negative number;
e.g., if a player guesses that his handicap is 'about 14', list his
handicap as -14. Temporary handicaps will be replaced, after the scores
are entered, by handicaps computed under the Calloway system.
The program will produce and continually update a 'results' file,
in the same format as the entry list file but with the tournament
scores included for each player who has finished. If the program is
interrupted for any reason, it may be restarted using this file in
place of the entry list.
When the program starts, you will asked whether of not to use an
existing old data file, then to give the name of the input file
and a name for the results file.
You will then be presented with a menu offering the choices:
Enter
Display
Print
Check
Quit
A menu choice, here and elsewhere, may be made either by moving the
highlight bar (with the up- and down-arrow keys) and pressing Enter
or by typing the initial letter of the entry.
Enter:
This is used for entering the scores of the players as they finish.
Type the name of the player (or as much of the name as necessary to
uniquely identify him), and then his scores. The scores should be
entered consecutively, e.g. 454645645435465435. This is quick, but
but has the side effect that NO HOLE SCORE MAY BE GREATER THAN 9.
The program automatically formats the scores as xxx-xxx-xxx--xxx-xxx-xxx.
It is not necessary to enter all data at one time. The program will
recalculate the tournament results after each Entry session, and the
current status can be examined through the other menu options before
entering more data. If the flights are scheduled to play consecutively,
for example, then the results for each can be printed out as soon as
the last scores for that flight are entered.
Display:
This allows on-screen display of current data. You will be offered the
choices
Entries
Standings
Matches
Two X Two
Entries:
Displays the names, handicaps and scores currently entered.
Standings:
Displays current standings, choice of:
Match Play
Point System
Gross Score
Net Score
Matches:
Displays results of all matches between players in a selected
flight.
Two X Two:
Displays details of match between any two selected players.
Print:
Standings:
Same as Display/Standings, but sends output to the printer.
Matches:
For each player in a selected flight, prints out the results
of all his matches with others in that flight. (Creates a disk
file for each flight, which can be used as a permanent record
if desired, or erased later. These files are named MATCHES.x,
where x is the flight number, and may be fairly large. This
is another reason a hard disk is recommended.)
Check:
Allows entries to be checked one-by-one, and corrected if desired.
Options:
Name
Hcp
Scores
Accept
Delete
Match play points are alloted as in Ryder Cup play: 1 point for each
match won, 1/2 point for each match halved. Within each flight, the
winner is the player with the greatest number of points. Clearly ties
are possible, perhaps likely. If only two players tie, the winner could
be decided by checking which of them defeated the other in their match,
unless that match was also a tie. If three or more tie, the problem is
more complicated, since it might happen that A defeated B, B defeated C,
and C defeated A, for example. In any event, it is probably not very
hard to devise a tie-breaking system for each tournament, depending
on local preferences, and the program does not implement any system,
just reporting ties if they occur.
Several of the options ask for the name of a player. When this occurs,
you need enter only as much of the name as necessary to identify the
player: if Johnson, Sam is the only player named Johnson entered and
you wish to display some information about him, you need enter only
the last name; if there is also a Johnson, L. B. in the tournament,
however, you must enter at least 'Johnson, S' for Sam Johnson. In case
you enter an ambiguous name, and there are no more than 10 possiblities,
the program will list them all and ask you to choose one.
The source code is included. All of these files are original except
WINDOW.H and WINDOW.C, which are from Al Stevens column in Doctor
Dobbs Journal, September, 1988.
----------------------------------------------------------------------
There is no charge for this program. I would be delighted to hear from
anyone who uses it, and of course I hope that any bugs will be reported.
B. J. Ball, 3304 Glen Rose Drive, Austin, Texas 78731
----------------------------------------------------------------------