Beispiel #1
0
        //TODO get shopping menu's functional
        public static bool MainMenu(Character character, Ship ship, Planet planet, Store store)
        {
            Console.Clear();
            Graphics.MainMenu(character, ship);

            switch (Console.ReadLine())
            {
            case "1":
                TravelMenu(character, ship);
                return(true);

            case "2":
                ShoppingMainMenu(character, ship, planet, store);
                return(true);

            case "3":
                ShoppingMainMenu(character, ship, planet, store);
                return(true);

            case "4":
                ExitGame.exitGame();
                return(false);

            default:
                return(true);
            }
        }
Beispiel #2
0
        public static void Run()
        {
            try
            {
                Graphics.SplashScreen();

                Character character = new Character();
                Ship      ship      = new Ship();
                Planet    planet    = new Planet();
                Store     store     = new Store();

                bool displayMenu = true;
                while (displayMenu)
                {
                    displayMenu = Menu.MainMenu(character, ship, planet, store);
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
                ExitGame.exitGame();
            }
        }
Beispiel #3
0
        public double TimePassed(Character character, double distance, double warpSpeed)
        {
            double time = Math.Round(distance / warpSpeed, 2);

            character.age += time;

            if (character.age >= 60)
            {
                Console.WriteLine("You have reached 60 years of age, Captain. Your body can no longer withstand the rigors of space travel!");
                Console.ReadLine();
                ExitGame.exitGame();
            }

            return(time);
        }