Closed averbraeck closed 10 months ago
At the start of a round, the paid debt is calculated, but that has to be done correctly (not more than money available, not more than needed to cancel debt).
The correct formula is:
newPr.setPaidDebt(Math.max(0, Math.min(0, newPr.getSpendableIncome()) - oldPr.getSpendableIncome()));
Updated.
Check that the calculation is correct:
At the start of a round, the paid debt is calculated, but that has to be done correctly (not more than money available, not more than needed to cancel debt).