Posts

Showing posts from April, 2021

V1.2.0.202104122145 Player database!

Image
After a few days of figuring out how to interact with a database, I’m finally confident that I can interact with a database using code-generated SQL. Linked the player creator to an external data source (presently using a 2004 version MS Access file). Player creator generate player button reads a random first name and surname and (state or country) from separate tables. Player creator now has a button to save the randomised player to the database. Player creator also has a button to save randomised players to database in bulk (user-specified number). Temporarily used a pop-up input box just to get it working. Tested out with 100 players – took 10 seconds. Player data is incomplete at present (eg no pitching attributes) but the basic structure is complete and fields can be added/changed as required.

V1.1.7.202104062135 Counting pitches and more player info

Image
Started by counting pitches to output inning pitch counts to the game log. This didn't take long so I moved on to the player creator. A lot of work done on the player creator this time around. Also began the reconstruction of the hit outcome calculations. Renamed StartPitch procedure to StartPlay and separated into two procedures (StartPlay and StartPitch). StartPlay now calls StartPitch if no pre-pitch play has occurred (eg balk, pickoff attempt). Add pitch counts to StartPitch procedure. Array was already there, just needed to add to it. Outputs pitch count for non-batting team to end of inning summary. Tested and is correct. Added complete range of attributes to player creator form and code for hitting, fielding and pitching. Presently pitching attributes do not have any code. Also added to player creator additional player info (names, height/weight, region and state/country). Presently names and state/country are randomly generated using case selection (will event