home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
HD
/
HD048.ZIP
/
BASEBALL.ZIP
/
STATPAK.DOC
< prev
next >
Wrap
Text File
|
1988-01-05
|
40KB
|
888 lines
Baseball Statkeeper
Version 3.0
(C)1987 By Michael J. Himowitz
Distributed by Federal Hill Software
8134 Scotts Level Road
Baltimore, MD 21208
INTRODUCTION
Baseball Statkeeper is a program for the IBM-PC and
compatibles which will track batting and fielding statistics for
up to 220 players on 12 teams. I designed it with Little Leaguers
in mind, but it can be used to keep records for almost any
baseball organization, including high school and college teams or
local softball leagues.
Version 3.0 contains many improvements over earlier versions
of the program. In fact, I've rewritten it from top to bottom.
This one is compiled, which means it runs much faster than the
old one and doesn't require the BASIC interpreter. Full-screen
data entry and more sophisticated sorting techniques have been
added. Statkeeper now tracks fielding as well as batting records,
and I've streamlined the program to make it easier to use.
The cost of all this is a restructuring of the filing system,
which means that files created with previous versions of
Statkeeper won't work with this one. However, I've tried to get
this one out early enough so folks can start their 1988 leagues
using this version.
While Federal Hill Software is (hopefully) a money-making
outfit, this particular program is a labor of love. So we're
distributing Baseball Statkeeper under the LeagueWare concept. If
you like it and use it, make a contribution to your local little
league (if you can't give your time, give them some money or take
the kids on your team out for ice cream after a game). If you
don't have a little league, you can make a contribution to ours:
Pikesville Baseball Inc., P.O. Box 5965, Pikesville, MD 21208.
You may give this program to anyone or post it on your local
bulletin board under the following conditions: (1) You may not
distribute the program in modified form. (2) You must distribute
all the files listed below when you give the program to someone
else.
1
System Requirements
Baseball Statkeeper will run on any close IBM compatible with
at least 256K of memory. By "close compatible," I mean that the
computer must have a video adapter that conforms to any of the
standard IBM video displays--MDA, CGA, EGA, VGA or Hercules.
Unfortunately, it won't run on semi-compatibles such as the Tandy
2000, TI Professional or Sanyo 550 series. It will run on all
Tandy 1000, 1200, 3000 and 4000 machines with sufficient memory.
It will run just fine on single-drive systems. You should store
your data files on the same disk as the program.
The Statkeeper Files
The disk or ARC file you received or downloaded should contain
the following files:
BASEBALL.BAT Batch file MUST be used to start program.
STATPAK.EXE The Statkeeper program
SPEEDSCR.COM A screen handler used by Statkeeper
STATPAK.PAK Compressed screens used by Statkeeper
STATPAK.DOC These instructions
DEMO.PLY A sample player data file
DEMO.TMS A sample team data file
Setting up Statkeeper
Statkeeper is easy to set up. It will run from floppy or hard
drive systems. The only caveat is that all program files
(STATS.BAT, STATPAK.EXE, STATPAK.PAK and SPEEDSCR.COM) must be on
the same disk, or in the same hard disk directory, from which the
program is launched. Your data files should also be on the same
disk or in the same hard disk directory as the program files. I
haven't included fancy disk handling routines because the program
doesn't really need them. Even on a single floppy that includes
the operating system and all the Statpak program files, you'll
still have room for four or five complete, 220-player leagues.
2
Running Statkeeper
To run statkeeper, just type BASEBALL and hit the RETURN or
ENTER key. You MUST launch the program by using the BASEBALL.BAT
file. DO NOT try to launch STATPAK.EXE directly. Here's why:
Before running Statkeeper, BASEBALL.BAT loads the SPEEDSCR.COM
utility, a screen handler required by the program. If
SPEEDSCR.COM is not loaded, the program won't work. The
BASEBALL.BAT file also removes SPEEDSCR when you exit from the
program. While SPEEDSCR won't do any harm if left in memory, it
can, under some unusual circumstances, display Statkeeper's
various screens on your monitor while you're doing something
else. The odds of this happening are about 1 in 20,000, but if
you use BASEBALL.BAT to launch the program, it will never happen.
When you run the program, you'll see a title screen, followed
a few seconds later by the Main Menu. When you see the menu,
you're ready to begin.
The Main Menu
Baseball Statkeeper is menu-driven. Depending on what you're
doing at the time, you'll see a variety of screens with numbered
choices. By selecting the proper number, you can get to the
function you want. When you first run the program, you'll see the
following menu:
No League Chosen
Use <ARROWS> to select <ENTER> to Choose
1 ADD A PLAYER
2 UPDATE A PLAYER
3 TEAM LIST
4 SELECT DISK FILE
5 SORT STATS
6 PLAYER REPORTS
7 CORRECT PLAYER NAME
8 QUIT THE PROGRAM
File: Players: 0 Teams: 0
No Sorting in Effect
When you have set up or loaded a league file, the words "No
League Chosen" will be replaced by the name of the league.
Likewise, the "File: Players: Teams" at the bottom of the menu
will contain the name of the disk file you're currently using,
along with the number of players and teams in the league whose
information is stored in that file.
3
To select any function from the Main Menu you may do one of
two things:
1. Use the Up or Down cursor keys to move the
highlight bar to your choice and then hit
the <RETURN> key.
2. Or just type the number of the choice you want.
Before you can use any of the statistical functions, you must
create or load a data file from your disk using Choice No. 4 from
the Main Menu. We'll discuss that now.
Setting Up a League
Even if you're only tracking one team, you must set up a
league. To do this, choose No. 4 from the Main Menu. You will see
a list of files on your disk or in the current hard disk
directory. The files displayed, if any, will all have the
extension PLY.
To set up your league, type the name of the file in which you
want the data stored. You can use any standard DOS filename up to
eight characters in length. DO NOT put an extension on the
filename. Statkeeper will add the proper extension. When setting
up a new league, be sure to choose a filename that doesn't
already exist. If you type the name of an existing league file,
Statkeeper will assume you want to load that file into memory.
When you type a new filename, Statkeeper will ask you if you want
to create a new league file. If you do, type "Y" and the program
will continue. If you type anything else, you'll return to the
Main Menu.
Establishing Teams
When you have named your new league file, Statkeeper will
display a screen on which you may enter the name of the league
and the names of the teams in the league.
This is the first data entry screen you will encounter. You
will notice a number of highlighted fields. In each of these
fields, you can type the appropriate information. To move onto
the next field, just hit the RETURN or ENTER key.
You may move backwards and forwards through the fields on each
screen by using the UP and DOWN cursor keys. When you reach the
last field on the screen, hitting the UP or DOWN cursor key or
striking RETURN will recycle you back to the first field.
When you're completely through entering data on a screen, hit
the ESC key and the program will prompt you for the next step.
This is the way ALL data entry screens in Statkeeper work.
4
Baseball Stakeeper 3.0
This is the way the league setup screen will look. I've filled
in some of the blanks to show you a six-team league called the
Pikesville Minors:
TEAM NO. 1 PHILLIES
TEAM NO. 2 ORIOLES
TEAM NO. 3 YANKEES FULL NAME OF THIS
LEAGUE
TEAM NO. 4 DODGERS
TEAM NO. 5 REDSOX PIKESVILLE MINORS
TEAM NO. 6 WHITESOX
TEAM NO. 7
TEAM NO. 8
TEAM NO. 9
TEAM NO. 10
TEAM NO. 11
TEAM NO. 12
When you first see this screen, your cursor will be resting on
the League Name field. Type the name of the league and hit
RETURN.
The cursor will then move to the Team No. 1 field. Type the
name of your first team in the Team No. 1 field and hit RETURN.
Your cursor will move to the Team No. 2 field. If you have a
second team, type the team name and hit RETURN. Continue until
you've named all the teams in your league (You don't have to use
all 12, just as many as you need).
When you're through typing the names of your teams, hit the
ESC key. The program will ask you if the information is correct?
Look it over. If the information is correct, type "Y" and the
league file will be created on the disk. If it's not correct,
type "N" and you'll be returned to the first data entry field.
At this point, it's a good idea to write down the names and
team numbers you've entered or use the SHIFT-PrtSc key to dump
the screen to your printer. It will come in handy in the next
step. You may add teams or change team names in similar fashion
at any time by selecting TEAM LIST from the main menu.
5
Baseball Stakeeper 3.0
Setting Up a Player Roster
Once you've set up your teams, the program will ask you if you
want to begin entering the names of players. If you do, type "Y"
and you'll go to the player entry screen. If you don't want to
enter players names now, type "Y" and you'll return to the Main
Menu.
When you have confirmed that you want to enter a player,
you'll see a player entry form displayed on the screen. It will
ask for the LAST NAME, FIRST INITIAL and TEAM NUMBER for each
player. The teams will be displayed on the left-hand side of the
screen for your reference.
Type each piece of information and hit the RETURN key to
advance to the next field. For the team number, you must use a
leading zero if the number is less than 10; i.e., "06" for team
No. 6.
When you're through, hit the ESC key. You'll be asked if the
information is correct. If it is, type "Y" and the program will
store the new player. If it isn't, type "N" and the program will
send you back to the player entry form.
After the player has been stored, the program will ask if you
want to add another player. If you do, type "Y" and the process
will be repeated. If you don't want to add another player, type
"N" and you'll return to the Main Menu.
You may add a player in a similar fashion at any time by
selecting Choice No. 1 (ADD A PLAYER) from the Main Menu.
6
Baseball Stakeeper 3.0
UPDATING YOUR PLAYERS
This is the heart of the program. It allows you to enter game
stats for each player. The game stats are compiled into running
totals for Statkeeper's various reports.
When you select this choice from the Main Menu, you'll see a
data entry screen asking you for the Last Name and First Initial
of the player whose record you want to update. Enter the last
name and first initial and hit the ESC key.
The program will search through the player file until it finds
the first name that matches. It will then display the player's
name and team and ask if this is the player you want. If it is,
type "Y" and you'll go onto the update screen. If it isn't the
player you wanted (There may be more than one player with the
same name), the program will continue searching until it finds
another match or exhausts the player list.
When you've confirmed that this is the player you want, you'll
see the Game Stats screen. The player's current stats will be
displayed on the top line, and there will be fields below in
which you can enter the player's stats for this game. It looks
like this:
ENTER DATA FOR THIS GAME:
AT BATS 5 FIELDING CHANCES 5
HITS 2 PUTOUTS 2
HOME RUNS 1 ERRORS 1
SINGLES 1
HIT <ESC> WHEN YOU'RE THROUGH
DOUBLES 0
TRIPLES 0
WALKS 2
STRIKEOUTS 1
Your cursor will be resting on the AT BATS field. Enter the
number of AT BATS in this game and hit RETURN. Proceed from field
to field, entering the appropriate data for each. If you don't
want to include fielding stats, you can leave them blank. You can
go back to previous fields or advance to other fields by using
the UP and DOWN cursor keys.
The program will check to see that all the batting stats add
up. If you try to enter more HITS than AT BATS, or the home runs,
singles, doubles and triples don't equal the number of hits,
you'll get an error message and the cursor will be returned to
the proper data entry field.
When you're through entering data for the player, hit the ESC
7
Baseball Stakeeper 3.0
key. You'll be asked if this data is correct, if it is, type "Y"
and you'll go on to the next step. If the numbers are not
correct, type "N" and you'll be returned to the game stats form.
Once you've confirmed that the figures are correct, the
program will display the revised totals for the player in reverse
video at the top of the screen. You'll then be asked if you want
to update another player. If you do, type "Y" and the process
will be repeated. If you don't want to update another player,
type "N" and you'll be returned to the Main Menu.
Sorting Your Stats
One of the nice features of this program is that it allows
you to produce reports sorted by various statistics. So you can
produce one report that shows the players ranked according to
Batting Average, another showing them ranked by Home Runs,
another by Strikeouts, etc. You can probably find a sort that
makes almost any player look good. Kids really love this stuff,
and if you're into serious coaching, it can be a valuable tool.
When you select this choice from the Main Menu, you'll see a
menu of sorting options that looks like this:
Sort Menu
1. By Name 9. By Walks
2. By Team 10. By OBP
3. By Hits 11. By Strikeouts
4. By Batting Avg. 12. By Fielding Chances
5. By Home Runs 13. By Putouts
6. By Singles 14. By Errors
7. By Doubles 15. By FPC
8. By Triples 16. Return to Menu
Enter the number of your choice:
To choose the sort you want, just type the number of your
choice and hit RETURN. Choice No. 16 returns you to the Main
Menu.
Once you have chosen the sort you want, you'll be asked if you
want the sort in ascending (lowest to highest) or descending
(highest to lowest) order. Type "A" for an ascending sort or "D"
for a descending sort. You'll probably want ascending sorts for
Name (which would be alphabetical), strikeouts and errors and
descending sorts for the other stats. But you get your choice.
When you have chosen a sort, a sorting message will appear on
the screen. When the sort is completed, you'll get a beep and
you'll be prompted to hit any key to return to the main menu.
The time it takes to sort depends on how many players you have
and how much work the sorting routine has to do. It can range
from a second or two to more than a minute. (Programmer's note: I
used an elementary Shell sort here. It's not the fastest, but it
8
Baseball Stakeeper 3.0
seemed to have fewer recursion and stack space problems than some
of the more sophisticated sorting algorithms. In future versions,
I may include a machine language sort, but I wanted to get this
out in time for the folks in Florida and California with early
seasons).
Player Reports
Here's where the fun comes in. When you select this choice
from the Main Menu, you'll see a list of report which looks like
this:
REPORT MENU
1. All Players
2. Players by team
3. All teams (printer only)
4. Team summaries
5. Return to Main Menu
Your choice (Type 1-5)
To choose the type of report you want, type the number next to
the report. Remember that all players will be listed in the order
of the most recent sort. We'll discuss the various reports now.
ALL PLAYERS
This will produce a screen or printer listing of all players
in the order of the most recent sort. When you choose this,
you'll be asked whether you want the report displayed on the
(S)creen or your (P)rinter. Type "S" for the screen report or "P"
for the printer report.
If you choose the screen report, you'll see a screen showing
the players and their stats listed in the most recent sort order.
At the bottom of the screen you'll see three choices:
(N)ext Page (P)revious Page (M)enu
Type "N" to see the next screen of players. Type "P" to see
the previous screen. Type "M" to return to the Main Menu. You can
page forward and backward through your player list this way.
If you choose the printer option, you'll be instructed to make
sure your printer is on line. Make sure the print head is at the
top of a page. You will then be prompted to type "P" to make the
printout or "M" to return to the Main Menu.
PLAYERS BY TEAM
This report will show you a list of players on a given team.
When you choose this option, you'll be shown a list of teams and
9
Baseball Stakeeper 3.0
asked to enter the number of the team you want to see. Type the
team number and hit RETURN. You'll see a screen display of the
players on that team. At the bottom of the screen you'll be asked
if you want a printout. If you do, type "Y" and you'll be
prompted to hit any key to start printing. If you don't want a
printout, type "N".
You'll then be asked if you want to see another team. If you
do, type "Y" and you'll be asked what team you want to see. If
you don't, type "N" and you'll return to the Main Menu.
ALL TEAMS
This is a printer-only report. It will print out separate
pages for each team, one team to a page. The players will be
listed in the order of the most recent sort.
TEAM SUMMARIES
This will generate summaries of stats for each team, based on
the most recent player information. Each time you ask for a
summary, the program will reread the player stats to generate the
most up-to-date information. It may take a minute or more to do
this on a standard 8088 machine if you have a full 220-player
league. On an AT/compatible, it will be much faster.
When you select this report, you'll see the screen count off
the players as it reads each record. When it's through, offensive
statistics for each team will be displayed on the screen and
you'll be asked if you want to print the report. If you want to
print it, type "Y" and the report will be printed. If you don't
want the report printed, type "N" and the program will continue
with the next screen.
The next screen shows team defensive statistics. Again you'll
be asked if you want a printout. If you type "Y" the report will
be sent to your printer. If you type "N" you'll return to the
Main Menu.
10
Baseball Stakeeper 3.0
OTHER MAIN MENU FUNCTIONS
CORRECT AN ERROR
This entry from the Main Menu will allow you to correct a name
or team assignment. When you choose it, you'll be shown a form
asking you to type in the Last Name and First Initial of the
player whose record you want to modify. When you've typed the
information, hit the ESC key.
The program will search the player file till it comes up with
the first match. It will then display the player and team and ask
you if this is the one you want. If it isn't the player you want,
type "N" and the program will continue searching until it finds
another match or reaches the end of the list.
If it is the player you want, type "Y" and you'll see a player
correction form with the current information displayed. You can
change the information in any field. When you're through, hit ESC
You'll be asked if this information is correct. If it is, type
"Y" and the revised player name and team will be attached to the
old player's record. If you type "N" you'll be returned to the
main menu, and the record will not be changed.
TEAM LIST
This choice will display a list of team names and numbers,
with blank fields for the names of teams you haven't assigned
yet. You may use this to add teams or change team information
after your initial league setup. Just use the UP and DOWN arrow
keys to go to the field you want. You can type over old
information or enter new information if it's a blank field.
When you're through, hit the ESC key. You'll be asked if the
information is correct. If it is not correct, type "N" and you'll
go back to the team entry screen. If you type "Y" the revised
team information will be stored on disk.
CAUTION: If you switch the names of teams around and assign
them to different numbers, you'll also have to correct the player
information for each player assigned to the teams you've
switched. So be careful here.
PROGRAM NOTES
Baseball Statkeeper is copyrighted by the author and remains
his intellectual property under U.S. Copyright law. You are
authorized to use and distribute the program to anyone, post it
on a bulletin board, or include it in a user group or other
library under the following conditions:
1. The program must be distributed in unmodified form.
2. All the files associated with the program must be
distributed on the same disk or in the same .ARC file.
3. No money other than the standard, nominal copying fee
11
Baseball Stakeeper 3.0
associated with user libraries and shareware/public domain
catalogs may be charged for distribution of the program.
Although Federal Hill Software has taken great pains to make
sure this software works properly, neither Federal Hill Software
nor the author guarantee that the program will perform in any
specific manner or be suitable for any specific purpose. Nor will
Federal Hill Software or the author be liable for any damages
that may result from its use.
The data entry screens in this program were developed using
the Screen Sculptor and Speedscreen utilities from the Software
Bottling Company of New York. The SPEEDSCR.COM program used by
Statkeeper is licensed by Federal Hill Software from the Software
Bottling Company and may only be used with this program.
TECHNICAL NOTES
If you're not interested in programming, you can skip over
this information. If you are a programmer, you may find it of
interest.
Baseball Statkeeper was written and compiled using Microsoft
QuickBasic 4.0. Many of the screens displayed in the program were
developed using Screen Sculptor and Speedscreen from the Software
Bottling Company of New York. These are excellent utilities that
can save days of work on a major project. If you do any
programming that requires data entry, they're well worth the
investment.
The screens used in the program are stored in packed format in
the file called STATPAK.PAK. They are handled by the SPEEDSCR.COM
program, which is loaded into memory by the BASEBALL.BAT file.
Calls to Speedscreen are made from within the program.
Data files for each league are contained in two files with the
extensions PLY and TMS. The .TMS file is a straight ASCII file
containing the name of the league, the number of teams and the
name of each team.
The .PLY file contains the current stats for each player. It's
a random access file with a length of 78. Each record is actually
an ASCII string. The first 77 characters contain the current data
for each player just as it would be displayed on the screen or
printer. The last byte is an ASCII character representing the
number of the record plus 32.
When the file is loaded, each player's record becomes an
element in an array. Displaying the record becomes an easy
matter. All I have to do is print the first 77 characters. The
last character of each record is a code showing the number of the
record on the disk file representing that player. I did this so
that when I sort the data, I can always tell which player belongs
where. In the sort, the actual array elements are swapped. This
is rather crude, but it keeps the program simple, because no
index files are necessary.
When a player's record is updated, the program breaks the
player's string into its separate numeric components, performs
calculations based on the new game data, reassembles the screen,
12
Baseball Stakeeper 3.0
and writes the record back to disk in the proper place
(determined by the last byte of the record).
I realize that this is a strange duck, but it has one major
advantage in that the entire league file is kept in memory. This
makes searches and updates fast. The program is not constantly
going to disk. At the same time, it ensures the integrity of the
data by writing the player's record to disk each time it's
updated.
Unfortunately, my license with The Software Bottling Company
of New York prevents me from distributing the source code.
However, I include this information in case you want to develop
your own routines for accessing the data. Here's a simple way to
do it in BASIC, assuming that player data is stored in the file
"FILENAME.PLY":
10 DIM PLAYER$(220)
20 open "FILENAME.PLY" (FOR RANDOM) AS 1 LEN=78
30 Field #1, 78 as PLY$
40 howmany=lof(1)/78
50 for x=1 to howmany
60 get #1, x
70 next x
80 close #1
The (FOR RANDOM) in line 20 is required by QuickBasic 4.0 but not
by the BASIC interpreter. Each player's record is now an element
in the array PLAYER$(). If you want to display all the records,
add these lines:
90 CLS
100 FOR X=1 to HOWMANY
110 PRINT LEFT$(PLAYER$(X),77)
120 NEXT
By using MID$ and VAL, you can pick apart each element to get the
various stats.
If you want, you can write the data back to disk in a straight
ASCII file readable by word processors. Use the following lines
as a guide. Make sure to choose a different name for your output
file than the filename you loaded:
200 open "NEWFILE.DAT" for output as 1
210 for X=1 to howmany
220 print #1, left$(player$(x),77)
220 next
230 close #1
Try this out with the DEMO.PLY file that came with the program.
It's probably a good idea to make a copy of the file elsewhere
before you start playing with it.
13
Baseball Stakeeper 3.0
AND NOW A WORD FROM OUR SPONSOR
This program is a freebie. We think it's a good one. We also
sell software, which is how we stay in business. Our commercial
programs are known as The Cambridge Handicappers. They're
professional-quality handicapping systems for Thoroughbred,
Harness and Greyhound Racing.
If you don't follow racing, you may ask, "What's a
Handicapper?" Briefly, a handicapper is a system that analyzes
the past performance of a horse or dog and applies that
information to an upcoming race. It allows you to rank the horses
or dogs in a race and make an intelligent wagering decision.
The Cambridge Handicappers do not represent a get-rich-quick
scheme. They do represent years of experience and research. If
they're applied intelligently and with some discipline, you can
make money at the track.
The handicappers use information which is readily available in
the Thoroughbred Racing Form, harness or dog track program.
Entering the data each horse or dog is quick and easy. We even
provide a diagram of sample Racing Form and track program entries
to show you where to get each piece of information you need.
With a little practice (it doesn't take long to learn how to
do it), you can handicap a race in minutes and a whole card in
less than an hour--even if you've never handicapped a race
before.
When you're through, the programs will show you a list of the
horses or dogs in each race, with their numeric scores. The
higher the score, the more likely the animal is to win the race.
Our complete instruction manual doesn't just show you how to
use the program. It tells you how to bet and, most important,
when to bet on a race. Knowing when to sit out can be just as
important, since some races just can't be properly handicapped,
no matter what the tip sheets at the track tell you.
In addition, the IBM and Apple versions of the program include
our Wagermaster software, which will show you anticipated payoffs
on a wide variety of bets at various odds, as well as key bets
for daily doubles, perfectas, exactas, triples and trifectas.
The Thoroughbred, Harness and Greyhound Handicappers are sold
separately. The IBM versions are $30 each. You can order any two
for $50 or all three for $70.
The Apple II versions are $49.95 each, any two for $74.95 and
all three for $99.95.
Versions for the Commodore 64 and Tandy Color Computer (all
models, tape or disk) are $39.95 each, any two for $59.95 and all
three for $79.95.
To order, send a check, money order or credit card
information (we accept VISA and MASTER CARD) to Federal Hill
Software, 8134 Scotts Level Road, Baltimore, MD 21208 (301-521-
4886). Credit card orders should include the card number and
expiration date.
If you like racing, you won't find better handicapping
software at any price.
14
Baseball Stakeeper 3.0
15
Baseball Stakeeper 3.0