/// <summary> /// Checks reserve limits /// </summary> public bool CanGiveCredit(Agent whom, MoneyView desirableSum) { return(HowBigCreditCanGive(whom).isBiggerOrEqual(desirableSum)); }
/// <summary> /// includes checks for Cash and deposit. /// </summary> public bool CanReturnDeposit(Agent agent, MoneyView howMuch) { return(HowMuchDepositCanReturn(agent).isBiggerOrEqual(howMuch)); }
/// <summary> /// Agent refuses to pay debt /// </summary> public void OnLoanerRefusesToPay(Agent agent) { givenCredits.Subtract(agent.loans); agent.loans.SetZero(); }
/// <summary> /// Returns deposits only. As much as possible. checks inside. Just wouldn't give money if can't /// </summary> public void ReturnAllDeposits(Agent toWhom) { ReturnDeposit(toWhom, HowMuchDepositCanReturn(toWhom)); }