Example #1
0
 /// <summary>
 /// Checks reserve limits
 /// </summary>
 public bool CanGiveCredit(Agent whom, MoneyView desirableSum)
 {
     return(HowBigCreditCanGive(whom).isBiggerOrEqual(desirableSum));
 }
Example #2
0
 /// <summary>
 /// includes checks for Cash and deposit.
 /// </summary>
 public bool CanReturnDeposit(Agent agent, MoneyView howMuch)
 {
     return(HowMuchDepositCanReturn(agent).isBiggerOrEqual(howMuch));
 }
Example #3
0
 /// <summary>
 /// Agent refuses to pay debt
 /// </summary>
 public void OnLoanerRefusesToPay(Agent agent)
 {
     givenCredits.Subtract(agent.loans);
     agent.loans.SetZero();
 }
Example #4
0
 /// <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));
 }