Exemplo n.º 1
0
        // User selects Armours
        private void ArmourOption()
        {
            ObjectMenu <Armour> menu = new ObjectMenu <Armour>(shop.Armours, Status);
            Armour armour            = menu.Run();

            if (armour != null)
            {
                if (armour.Cost <= player.Gold)
                {
                    player.RemoveGold(armour.Cost);
                    player.Inventory.AddItem(armour.Clone());
                }
                else
                {
                    Console.WriteLine(INSUFFCIENT_FUNDS_PROMPT);
                }
            }
            this.Run(); // Run the menu again
        }