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