A simulation of an entire baseball game, from start to finish. Based off of MLB league averages pulled from websites like FanGraphs and BaseballSavant.
There's a memory leak somewhere, but I am having a lot of trouble pinpointing the issue and fixing it. My suspicion is that it is one of the setTimeout() functions that I have. This simulation requires a lot of setIntervals and setTimeouts to make the game flow properly.
This issue is most likely from a large number of variables in the global scope. The next step will be to consolidate these variables into local scopes.
There's a memory leak somewhere, but I am having a lot of trouble pinpointing the issue and fixing it. My suspicion is that it is one of the setTimeout() functions that I have. This simulation requires a lot of setIntervals and setTimeouts to make the game flow properly.