Esempio n. 1
0
 public void PurchasePerk(Company company, Perk perk)
 {
     throw new NotImplementedException();
 }
Esempio n. 2
0
 public void SellPerk(Company company, Perk perk, int count)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
        /// <summary>
        /// Finds or creates an this company's record of the given perk.
        /// </summary>
        /// <param name="perk">The perk to find.</param>
        /// <returns>A CompanyPerk that represents the requested perk.</returns>
        public CompanyPerk GetPerk(Perk perk)
        {
            var output = Perks.FirstOrDefault(p => p.Perk == perk);

            if(output == null)
            {
                output = new CompanyPerk
                {
                    Perk = perk,
                    Count = 0
                };

                Perks.Add(output);
            }

            return output;
        }