mainIine / foe-helfer-extension

FoE Helfer - Extension for chromium based browsers and Firefox ;-)
https://foe-helper.com
GNU Affero General Public License v3.0
119 stars 181 forks source link

GB Cost calculator incorrect calculation #2659

Open metablaster opened 10 months ago

metablaster commented 10 months ago

This error in calculator seems to be only when there is a tie for spot with another player. Unfortunately, I missed the chance to take a screenshot, so here is an example that should be easy to test code with:

Some GB has 21 FP's to flip. 1st spot is taken with 11 FP's Therefore, to take over 1st spot you need to insert (21 + 11) / 2 = 16 fps with 5 left to flip... The guy that is now out bidden to 2nd spot can insert another 5 and will have the same amount donated as you, however this won't make him move to 1st spot because there is a tie, and you were first to take the spot.

The GB Cost calculator doesn't recognize this and tells you need to donate 17 to lock down, however 16 is enough as you can see from simple math above.

Thus, you're losing 1 FP for every such donation.