public void Tick(ClipStorage clips, FundStorage funds, Random random) { if (random.True(Demand / 100)) { var count = Integer.Floored(0.7 * Math.Pow(Demand, 1.15)); if (clips.TryTake(count, out var taken)) { funds.Add(Margin * taken); } } }
public bool TryPurchaseSpool(FundStorage funds, out Integer wire) { if (funds.TryTake(Cost)) { Timer = 0; BasePrice += Money.Cents(5); wire = PerSpool; return(true); } else { wire = Integer.Zero; return(false); } }