Beispiel #1
0
        public static string Travel(Adama gametraveler, List <SpaceTimeLocation> spaceTimeLocations)
        {
            string messageBoxText =
                $"{gametraveler.Name}, Aion Base will need to know the name of the new location.\n" +
                " \n" +
                "Enter the ID number of your desired location from the table below.\n" +
                " \n" +

                //
                // display table header
                //
                "ID".PadRight(10) + "Name".PadRight(30) + "Accessible".PadRight(10) + "\n" +
                "---".PadRight(10) + "----------------------".PadRight(30) + "-------".PadRight(10) + "\n";

            //
            // display all locations except the current location
            //
            string spaceTimeLocationList = null;

            foreach (SpaceTimeLocation spaceTimeLocation in spaceTimeLocations)
            {
                if (spaceTimeLocation.SpaceTimeLocationID != gametraveler.SpaceTimeLocationID)
                {
                    spaceTimeLocationList +=
                        $"{spaceTimeLocation.SpaceTimeLocationID}".PadRight(10) +
                        $"{spaceTimeLocation.CommonName}".PadRight(30) +
                        $"{spaceTimeLocation.Accessable}".PadRight(10) +
                        Environment.NewLine;
                }
            }

            messageBoxText += spaceTimeLocationList;

            return(messageBoxText);
        }
        /// <summary>
        /// default constructor to create the console view objects
        /// </summary>
        public ConsoleView(Adama gameTraveler, Universe gameUniverse)
        {
            _gameTraveler = gameTraveler;
            _gameUniverse = gameUniverse;

            _viewStatus = ViewStatus.TravelerInitialization;

            InitializeDisplay();
        }
Beispiel #3
0
        /// <summary>
        /// initialize the major game objects
        /// </summary>
        private void InitializeGame()
        {
            _sar             = new Adama();
            _gameUniverse    = new Universe();
            _gameConsoleView = new ConsoleView(_sar, _gameUniverse);
            _playingGame     = true;

            Console.CursorVisible = false;
        }
Beispiel #4
0
        public static List <string> StatusBox(Adama traveler, Universe universe)
        {
            List <string> statusBoxText = new List <string>();

            statusBoxText.Add($"Experience Points: {traveler.ExperiencePoints}\n");
            statusBoxText.Add($"Health: {traveler.Health}\n");
            statusBoxText.Add($"Lives: {traveler.Lives}\n");

            return(statusBoxText);
        }
Beispiel #5
0
        public static string InitializeMissionGetTravelerAge(Adama gameTraveler)
        {
            string messageBoxText =
                $"Very good then, we will call you {gameTraveler.Name} on this mission.\n" +
                " \n" +
                "Enter your age below.\n" +
                " \n" +
                "Please use the standard Earth year as your reference.";

            return(messageBoxText);
        }
        public static string InitializeMissionGetTravelerAge(Adama gameTraveler)
        {
            string messageBoxText =
                $"Thank you {gameTraveler.Name}, Please continue...\n" +
                " \n" +
                "Enter your age below.\n" +
                " \n" +
                "Please use the galactic year as your reference.";

            return(messageBoxText);
        }
Beispiel #7
0
        private void InitializeMission()
        {
            Adama sar = _gameConsoleView.GetInitialTravelerInfo();

            _sar.Name = sar.Name;
            _sar.Age  = sar.Age;
            _sar.Race = sar.Race;
            _sar.SpaceTimeLocationID = 1;

            _sar.ExperiencePoints = 0;
            _sar.Health           = 100;
            _sar.Lives            = 3;
        }
        /// <summary>
        /// initialize the major game objects
        /// </summary>
        private void InitializeGame()
        {
            _sar             = new Adama();
            _gameUniverse    = new Universe();
            _gameConsoleView = new ConsoleView(_sar, _gameUniverse);
            _playingGame     = true;

            //
            // add initial items to the traveler's inventory
            //
            _sar.Inventory.Add(_gameUniverse.GetGameObjectById(8) as TravelerObject);
            _sar.Inventory.Add(_gameUniverse.GetGameObjectById(9) as TravelerObject);
            _sar.Inventory.Add(_gameUniverse.GetGameObjectById(10) as TravelerObject);

            Console.CursorVisible = false;
        }
Beispiel #9
0
        public static string InitializeMissionEchoTravelerInfo(Adama gameTraveler)
        {
            string messageBoxText =
                $"Very good then {gameTraveler.Name}.\n" +
                " \n" +
                "It appears we have all the necessary data to begin your mission. You will find it" +
                " listed below.\n" +
                " \n" +
                $"\tTraveler Name: {gameTraveler.Name}\n" +
                $"\tTraveler Age: {gameTraveler.Age}\n" +
                $"\tTraveler Race: {gameTraveler.Race}\n" +
                $"\tTraveler home world: {gameTraveler.HomeWorld}\n" +
                $"\tTraveler home galaxy: {gameTraveler.HomeGalaxy}\n" +
                $"\tTraveler home dimension: {gameTraveler.HomeDimension}\n" +
                " \n" +
                "Press any key to begin your mission.";

            return(messageBoxText);
        }
        public static string InitializeMissionEchoTravelerInfo(Adama gameTraveler)
        {
            string messageBoxText =
                $"Thank you {gameTraveler.Name}.\n" +
                " \n" +
                "We have logged your vital information. You will find it" +
                " listed below.\n" +
                " \n" +
                $"\tTraveler Name: {gameTraveler.Name}\n" +
                $"\tTraveler Age: {gameTraveler.Age}\n" +
                $"\tTraveler Race: {gameTraveler.Race}\n" +
                $"\tTraveler home world: {gameTraveler.HomeWorld}\n" +
                $"\tTraveler home galaxy: {gameTraveler.HomeGalaxy}\n" +
                $"\tTraveler home dimension: {gameTraveler.HomeDimension}\n" +
                " \n" +
                "Press any key to begin your mission.";

            return(messageBoxText);
        }
Beispiel #11
0
        public static string InitializeMissionGetHomeWorld(Adama gameTraveler)
        {
            string messageBoxText =
                $"{gameTraveler.Name}, it will be important for us to know your Home Planet on this mission.\n" +
                " \n" +
                "Enter your Home Planet below.\n" +
                " \n" +
                "Please select from the Planets listed below." +
                " \n";

            string planetList = null;

            foreach (Planet HomePlanet in Enum.GetValues(typeof(Planet)))
            {
                if (HomePlanet != Planet.None)
                {
                    planetList += $"\t{HomePlanet}\n";
                }
            }

            messageBoxText += planetList;

            return(messageBoxText);
        }
Beispiel #12
0
        public static string InitializeMissionGetTravelerRace(Adama gameTraveler)
        {
            string messageBoxText =
                $"{gameTraveler.Name}, it will be important for us to know your race on this mission.\n" +
                " \n" +
                "Enter your race below.\n" +
                " \n" +
                "Please use the universal race classifications below." +
                " \n";

            string raceList = null;

            foreach (Character.RaceType race in Enum.GetValues(typeof(Character.RaceType)))
            {
                if (race != Character.RaceType.None)
                {
                    raceList += $"\t{race}\n";
                }
            }

            messageBoxText += raceList;

            return(messageBoxText);
        }
Beispiel #13
0
        public static string InitializeMissionGetHomeDimension(Adama gameTraveler)
        {
            string messageBoxText =
                $"{gameTraveler.Name}, it will be important for us to know your Home Dimension on this mission.\n" +
                " \n" +
                "Enter your Home Dimesnion below.\n" +
                " \n" +
                "Please use the universal Dimension classifications below." +
                " \n";

            string dimensionList = null;

            foreach (Dimension HomeDimension in Enum.GetValues(typeof(Dimension)))
            {
                if (HomeDimension != Dimension.None)
                {
                    dimensionList += $"\t{HomeDimension}\n";
                }
            }

            messageBoxText += dimensionList;

            return(messageBoxText);
        }
Beispiel #14
0
        public static string InitializeMissionGetHomeGalaxy(Adama gameTraveler)
        {
            string messageBoxText =
                $"{gameTraveler.Name}, it will be important for us to know your Home Galaxy on this mission.\n" +
                " \n" +
                "Enter your Home Galaxy below.\n" +
                " \n" +
                "Please select from the Galaxies listed below." +
                " \n";

            string galaxyList = null;

            foreach (Galaxy HomeGalaxy in Enum.GetValues(typeof(Galaxy)))
            {
                if (HomeGalaxy != Galaxy.None)
                {
                    galaxyList += $"\t{HomeGalaxy}\n";
                }
            }

            messageBoxText += galaxyList;

            return(messageBoxText);
        }
        public Adama GetInitialTravelerInfo()
        {
            Adama sar = new Adama();

            //
            // intro
            //
            DisplayGamePlayScreen("Mission Initialization", Text.InitializeMissionIntro(), ActionMenu.MissionIntro, "");
            GetContinueKey();

            //
            // get traveler's name
            //
            DisplayGamePlayScreen("Mission Initialization - Name", Text.InitializeMissionGetTravelerName(), ActionMenu.MissionIntro, "");
            DisplayInputBoxPrompt("Enter your name: ");
            sar.Name = GetString();

            //
            // get traveler's age
            //
            DisplayGamePlayScreen("Mission Initialization - Age", Text.InitializeMissionGetTravelerAge(sar), ActionMenu.MissionIntro, "");
            int gameAdamaAge;

            GetInteger($"Enter your age {sar.Name}: ", 0, 1000000, out gameAdamaAge);
            sar.Age = gameAdamaAge;

            //
            // get traveler's race
            //
            DisplayGamePlayScreen("Mission Initialization - Race", Text.InitializeMissionGetTravelerRace(sar), ActionMenu.MissionIntro, "");
            DisplayInputBoxPrompt($"Enter your race {sar.Name}: ");
            sar.Race = GetRace();

            //
            // get traveler's home world
            //
            DisplayGamePlayScreen("Mission Initialization - Home World", Text.InitializeMissionGetHomeWorld(sar), ActionMenu.MissionIntro, "");
            DisplayInputBoxPrompt($"Enter your home world {sar.Name}: ");
            sar.HomeWorld = GetHomeWorld();

            //
            // get traveler's home galaxy
            //
            DisplayGamePlayScreen("Mission Initialization - Home Galaxy", Text.InitializeMissionGetHomeGalaxy(sar), ActionMenu.MissionIntro, "");
            DisplayInputBoxPrompt($"Enter your home galaxy {sar.Name}: ");
            sar.HomeGalaxy = GetHomeGalaxy();

            //
            // get traveler's home dimension
            //
            DisplayGamePlayScreen("Mission Initialization - Home dimension", Text.InitializeMissionGetHomeDimension(sar), ActionMenu.MissionIntro, "");
            DisplayInputBoxPrompt($"Enter your home dimension {sar.Name}: ");
            //
            sar.HomeDimension = GetHomeDimension();

            //
            // echo the traveler's info
            //
            DisplayGamePlayScreen("Mission Initialization - Complete", Text.InitializeMissionEchoTravelerInfo(sar), ActionMenu.MissionIntro, "");
            GetContinueKey();

            //
            // change view status to playing game
            //
            _viewStatus = ViewStatus.PlayingGame;

            return(sar);
        }
Beispiel #16
0
 public void DisplayTravelerInfo(Adama gameTraveler)
 {
     DisplayGamePlayScreen($"Vital Information for {gameTraveler.Name}", Text.InitializeMissionEchoTravelerInfo(_gameTraveler), ActionMenu.TravelerMenu, "");
     //GetContinueKey();
 }