When I have farmCalc running in a steam install of trimps (presumed to be the same in browser), I don't get a nice printout about "the best for D stance and the best for S stance". I just get a single value of "the best" and what stance that is in. I shouldn't need to keep crunching numbers in this case to ultimately throw out a bunch of data. To address this I've tried to determine if we are running as just the passive ui element and limit the number of perfect maps we need to simulate, limit how far apart the current map needs to be from the prior map to stop, and how many maps below the current zone we need to simulate to stop.
Additionally I found it weird that the simulation was going for maps which are unaffordable even at 0,0,0 and spending a bunch of time simulating them. I added a check to prevent simulation if the map is unaffordable at all (returns value of 0 immediately).
If I can get a primer on how your styling works I can try to restyle my code so it doesn't stand out as much. I was just trying to set it up so that I had an easier time reading it while trying to figure out what it did and working on it.
When I have farmCalc running in a steam install of trimps (presumed to be the same in browser), I don't get a nice printout about "the best for D stance and the best for S stance". I just get a single value of "the best" and what stance that is in. I shouldn't need to keep crunching numbers in this case to ultimately throw out a bunch of data. To address this I've tried to determine if we are running as just the passive ui element and limit the number of perfect maps we need to simulate, limit how far apart the current map needs to be from the prior map to stop, and how many maps below the current zone we need to simulate to stop.
Additionally I found it weird that the simulation was going for maps which are unaffordable even at 0,0,0 and spending a bunch of time simulating them. I added a check to prevent simulation if the map is unaffordable at all (returns value of 0 immediately).
If I can get a primer on how your styling works I can try to restyle my code so it doesn't stand out as much. I was just trying to set it up so that I had an easier time reading it while trying to figure out what it did and working on it.