#include <stdio.h>
struct date
{
int month;
int day;
int year;
};
{
int hour;
int minute;
int second;
};
struct name
{
char firstName[20];
char middleInitial; // not always used
char lastName[20];
};
struct stats_record
{
int starts; // total for horse or jockey, not always used
int wins; // total for horse or jockey
int places; // total for horse or jockey
int shows; // total for horse or jockey
};
struct statistics
{
struct name statsName; // name of trainer or jockey
struct stats_record startWinPlaceShow;
};
struct win_place_show
{
char winName[20];
int winNumber;
char placeName[20];
int placeNumber;
char showName[20];
int showNumber;
};
struct race_condition
{
float purse; // prize money
char detailedRaceDesc[100];
char restriction [20]; // age restriction/condition
char weightAssignments[10];
char claimingCondition[80];
char raceDistance[20]; // example: "Seven Furlongs"
};
struct track_record_holder
{
char horsesName[20];
int horsesAge;
int weightCarried; // lbs
struct stats_record recordHoldersRaceRecord;
};
struct medication_equipment
{
char medicationCode; // L for Lasix
char equipmentCode; // g for goggles
};
struct horse_info
{
char horseColor[2]; // b for bay, bl for black
char horseGender; // c for colt, m for mare
int horseAge;
char sire[20]; // father
char dam[20]; // mother
};
struct totals
{
char totalsCategory[12]; // 2024, Life, AllWeather, Dirt, etc
struct stats_record totalStats; // starts, wins, place, show
int speedFigure;
int earnings; // whole dollar amounts
};
struct track_and_race
{
char trackCode[3]; // short for name of racetrack
int raceNumber;
};
struct final_position
{
int place;
float lengths; // fractional, lengths behind leader or lengths in front
};
struct finisher
{
char horseName[20];
int weightCarried;
float lengths; // fractional, lengths behind next position when crossing finish
};
struct past_race
{
struct date raceDate; // item 16
struct track_and_race trackRace; // item 17
char trackCondition[4]; // item 18, GD for Good, FIRM for Firm
float raceDistance; // item 20, in furlongs or miles (sometimes not whole like 1.70)
int daysUnraced; // item 21
struct time fractionalTimes
[2]; // item 22 char ageRestrictionLimit[3]; // item 23, stored as 2 characters for an age, and 1 character to denote R or L
int restrictedToFillies; // item 24, flag
int restrictedToStateBredHorses; // item 25, flag
char raceType[3]; // item 26, eg: Mst for maiden stakes
int equibasePaceFigures; // item 27
int speedFigure; // item 28
int postPostion; // item 29
float pointCalls[2]; // item 30, fractional
struct final_position finalPosition; // item 31
struct name jockeyName; // item 32
int weightCarried; // item 33
struct medication_equipment medEquip; // item 34
float finalOdds; // item 35
struct finisher topThree[3]; // item 36
char shortFootnotes[30]; // item 37
int numberOfHorses; // item 38
};
struct claiming_information
{
struct name newOwner;
struct name previousOwner;
int claimingPrice; // whole dollars
struct name formerTrainer;
};
struct workout_lines
{
struct date workoutDate;
char racetrackName[3]; // assuming all track names are shortened to 3 chars
int trackDistance; // in furlongs
char trackCondition[4]; // GD for Good, FIRM for Firm
int breezing; // 1 if breezing, 0 if handily
char rank[5]; // xx out of yy, seperated by a slash char
};
// main structure to store details on each race
struct race_details
{
struct date raceDate; // A - the date of the race
int raceNumber; // C - the specific race number identifier
char trackName[50]; // E - the name of the track where the race was held
int raceRating; // G - the earning estimate for the race winner
struct win_place_show notes; // H - notes area for the top 3 horses in the race
char raceType[3]; // I - the type of race (eg: maiden claiming is mcl)
struct race_condition condition; // J - the conditions of the race
struct track_record_holder trackRecord; // K - info about the track record holding horse
};
// main structure to store details on each horse
struct horse_details_and_past_performance
{
int programNumber; // 1 - the number of the horse being bet on
char saddleClothColor[12]; // 2 - the color of cloth
char morningLineOdds[3]; // 3 - the final assigned odds when the horse leaves the post
int claimingPrice; // 4 - the horses sale price (whole dollars assumed)
char owner[50]; // 5 - the owner of the horse
char silks[50]; // 6 - the jockey jacket color
struct statistics trainer; // 7 - the trainer name and info (starts, wins, places, shows)
char horseName[20]; // 8 - the name of the horse
struct medication_equipment medEquip; // 9 - the medication and equipment used by the horse
struct horse_info horsesInfo; // 10 - the color, gender, age, sire, and dam
int weightCarried; // 11 - the weight carried by the horse (lbs)
struct statistics jockey; // 12 - the jockey name and info (starts, wins, places, shows)
int horseClassFigure; // 13 - the estimate of what the starter will earn
struct totals totalsGeneral[4]; // 14 - basic prior race stats
struct totals totalsEnvironmental[4]; // 15 - basic prior race stats
struct past_race priorRaceStats[5]; // 16-38 - detailed prior race information
struct claiming_information claimInfo; // 39 - new and previous owner info
struct workout_lines workoutLines[4]; // 40 - insight into the horses fitness and readiness
};
int main ( )
{
// declare structs to test compile
struct race_details myRaces[10];
struct horse_details_and_past_performance myHorses[20];
return (0);
};