Baseball game dev diary version 0.1.2.202011102300: Adding lineups
- Changed runs array data type to UShort (previously Integer) as it will never have negative values and goes up to 65000 approx.
- Added public declarations for lineUp multidimensional array: teams 0-1 and batting order positions 1-9 (position 0 is ignored).
- Added (in hindsight, very inefficient) procedure to populate the lineUps. Presently data is fixed for testing purposes. PlayerIDs will be stored in the Lineups, not jersey numbers. The jersey numbers can then be retrieved from database along with name and attributes.
- Note that PlayerIDs are set as Integer to take into account hundreds of millions of players. Left as signed data type because values could be -1 (eg when there is nobody in the lineup spot or base is empty).
- Added resetBases procedure to run at end of inning.
Hopefully I'll remember its there when I work on the 'moving around the bases' part. Not sure why I did it so early, obviously I was planning ahead, judging from these notes:
Comments
Post a Comment