Esempio n. 1
0
        // Trade methods

        public void Trade()
        {
            Console.WriteLine();
            Console.WriteLine("What would you like to do?");
            Console.WriteLine("1 = Buy, 2 = Sell, 3 = Something else");
            Console.WriteLine();

            try
            {
                switch (int.Parse(Console.ReadLine()))
                {
                case 1:
                    BuyMenu();
                    break;

                case 2:
                    switch (MyShip.GetLocationId())
                    {
                    case 1:
                    case 2:
                    case 3:
                        Console.Clear();
                        SellMenu();
                        break;

                    case 4:
                        Console.Clear();
                        Console.WriteLine("We don't care about your junk here. Buy a ship or get lost.");
                        Console.WriteLine();
                        break;

                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                        OpSellMenu();
                        break;
                    }
                    break;

                case 3:
                    break;

                default:
                    TradeError();
                    break;
                }
            }
            catch (Exception)
            {
                TradeError();
            }
        }