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