Exemple #1
0
        public void SellNegotiate()
        {
            GoodyBag g = new GoodyBag();

            Console.WriteLine("Seriuosly?");
            Console.WriteLine("This is how much I would sell it for");
            //need to set up the negotiation before bring it back
            //g.negotiation();
            Console.WriteLine("How much do you want for it?\n");
            Console.WriteLine("1. Yes, give me that money.");
            Console.WriteLine("2. No, thats a terrible offer.");
            string pick = Console.ReadLine();
            int    option;

            while (!int.TryParse(pick, out option))
            {
                BuyNegotiate();
                pick = Console.ReadLine();
            }
            if (option >= 1 && option <= 2)
            {
                switch (option)
                {
                case 1:
                    g.sell();
                    break;

                case 2:
                    PlanetMenu();
                    break;
                }
            }
            else
            {
                Console.WriteLine("Invalid number try again.");
                Console.ReadLine();
                BuyNegotiate();
            }
        }
Exemple #2
0
        public void Sell()
        {
            GoodyBag g = new GoodyBag();

            Console.Clear();
            Console.WriteLine("Fine, What do you want to sell");
            Console.WriteLine("Don't show some worthless crap!\n");
            Console.WriteLine("Here is my offer\n\n");
            Console.WriteLine("1. Yes, I will sell.");
            Console.WriteLine("2. Get out here with that low ball offer!!!");
            string pick = Console.ReadLine();
            int    option;

            while (!int.TryParse(pick, out option))
            {
                Sell();
                pick = Console.ReadLine();
            }
            if (option >= 1 && option <= 2)
            {
                switch (option)
                {
                case 1:
                    g.sell();
                    break;

                case 2:
                    g.negotiation();
                    break;
                }
            }
            else
            {
                Console.WriteLine("Invalid number try again.");
                Console.ReadLine();
                PlanetMenu();
            }
        }