Exemplo n.º 1
0
        public void BuyItem(string item, Player buyer)
        {
            var food = this.GetFood(item);

            if ((food as IBuyable).Price <= buyer.Coins)
            {
                buyer.Coins -= (food as IBuyable).Price;
                buyer.AddItem(food);
            }
        }