Пример #1
0
        public string BuyItem(Player player, Item item)
        {
            if (player.Currency >= item.Cost)
            {
                player.Currency -= item.Cost;
                player.BuyItem(item);
                shopInv.Remove(item);

                return("Item Purchased");
            }
            else
            {
                return("not enough currency");
            }
        }