Posts

Showing posts from March, 2021

V1.1.6.202103231020 Fixing simmed game opening batter

Fixed the issue of opening batter ID showing as 0 when simming to top of last or simming full game. This was fixed by moving the nextbatter procedure call from the end of the simming loops to the beginning of the loops. Fixed the issue when simming full game, the home team’s full row of buttons were disabled in the line score. Removed the ‘if not simming’ conditions in the toggleHomeInningButton procedure. This game log should be all correct after the recent fixes (the numbers in parentheses are the in-game play codes, just ignore them): Inning 1, PEN batting (30) 327 flies out on a 1-0 count.  Error made; 327 reached 1st safely.  (1) 315 strikes out. 1 out.  (20) 323 grounds out on a 0-0 count. 327 advances to 2nd. 2 out.  (1) 309 strikes out. 3 out.  End of inning. Runs: 0, Hits: 0, Errors: 1, Walks: 0, Left on base: 1, Pitches: TBA Inning 1, BRS batting (1) 423 strikes out. 1 out.  (1) 410 strikes out. 2 out.  (12) 421 doubles on a 0-0 count.  (1) 422 strikes out. 3 out. 

V1.1.5.202103211320 Fixing game log after dropped third strikes and errors

After analysing a whole simmed game, I identified several issues created by the inclusion of dropped third strikes and errors. It seemed that outs and baserunners were not being handled correctly. So as predicted, the logic didn’t work as intended. Also I realised that dropped third strikes were not actually errors so I had to stop them being recorded as such. Fixed dropped third strikes being recorded as errors and the text output to game log because of such. Moved the advanced to 3rd from 2nd (or 1st) and advanced to 2nd from 1st code that was in single, double, groundouts, flyouts, strikeouts (and would have been in many plays added later) to their own procedures ( CheckAdvanceTo3rd and CheckAdvanceTo2nd ). Will probably do the same with all runner movement to avoid duplication of code. Added text ‘advances to 3rd’ and ‘advances to 2nd’ to game log when such activity happens. This will help with debugging but also improve the user experience. Did this with two new Boole

V1.1.4.202103032300 Basic player creator, line score tidy up and additional play results, including errors

This was a pretty huge four days! Player creator: This idea came to me when I started wondering how I could fulfil my plan of creating 10,000 players at random, at the same time giving them realistic attributes. Added a separate form to generate players which can eventually be saved to database. Presently just generates attributes for contact and power vs L/R based on an entered minimum number of points to allocate, and entered maximum value for bonus points. Bonus points are calculated at random and added to total points to allocate across all attributes. If an attribute is already on 100, that bonus point is wasted. Works pretty well and will be expanded upon. Line score tidy up: This was something that was mostly a quick fix so I thought I may as well get it out of the way now. Now the button for the bottom of the current inning is disabled if playing the top of the inning. Now puts an X in the bottom of the 9th if not played at game end and disables tha