public void makeDeal(exchange exchange, int moneyd) { reRatingCont(); deal deal = new deal(this, moneyd); ContractorDeals.Add(deal); exchange.bid(deal); }
//true or false public bool doaudit(deal deal) { if (rand.Next(1, 100) < 20) { deal.isFair = !deal.isFair; } return(deal.isFair); }
public void addProtocol(deal deals) { count += 1; list.Add(new protocol(deals.contactor.Name, deals.money, deals.isFair, count)); if (true) { Console.WriteLine("protokol namme {0} money{1} fair{2} count{3}", deals.contactor.Name, deals.money, deals.isFair, count); } }
public void bid(deal deals) { bool auditRaiting = deals.contactor.Raiting > maxAuditRatingContactor ? (random.Next(1, 10) == 1 ? true : false) : true; bool auditMoneyd = deals.money > this.sumAuditLimits ? (random.Next(1, 10) == 1 ? true : false) : true; if (auditRaiting && auditMoneyd) { auditor.money += (int)(deals.money * auditorMonyP); deals.money -= (int)(deals.money * auditorMonyP); auditor.doaudit(deals); } dealevent(deals); }