Fix repeatables buying more than intended when cumulativeCost is false #18

Open
ducdat0507 wants to merge 1 commit from ducdat0507/patch-1 into main
ducdat0507 commented 2023-05-19 10:19:18 +00:00 (Migrated from github.com)

The logic for calculateMaxAffordable didn't account for how much of a repeatable you already bought so it ended up overshooting by a lot

The logic for `calculateMaxAffordable` didn't account for how much of a repeatable you already bought so it ended up overshooting by a lot
Collaborator

I'm sorry I haven't looked at your PR for fixing calculateMaxAffordable in so long. I don't remember why I didn't merge it earlier, but I think I'd just wanted to see why the current tests didn't fail. I've run them with and without your changes and actually I think the existing behavior is correct. I was wondering if you could give me a test case where you were getting the wrong result using the current implementation

image

I'm sorry I haven't looked at your PR for fixing calculateMaxAffordable in so long. I don't remember why I didn't merge it earlier, but I think I'd just wanted to see why the current tests didn't fail. I've run them with and without your changes and actually I think the existing behavior is correct. I was wondering if you could give me a test case where you were getting the wrong result using the current implementation ![image](/attachments/b965b0b1-0c18-42ba-a84e-812d4dbf97ba)
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ducdat0507/patch-1:ducdat0507/patch-1
git checkout ducdat0507/patch-1
Sign in to join this conversation.
No description provided.